1 def add(i):
2 return '\''+i+'\''
3 a = ['a', 'b']
4 print " or ".join([add(i) for i in a])
OUTPUT: 'a' or 'b'
I am not sure if the above is the best way (esp the add function).
Is there a better way to achieve what I am trying to do?