What would be your preferred way to concatenate strings from a sequence such that between each two consecutive pair a comma is added. That is, how do you map, for instance,
[ 'a', 'b', 'c' ]
[ s ]
''.join(map(lambda x: x+',',l))[:-1]
myList = ['a','b','c','d'] myString = ",".join(myList )
This won't work if the list contains numbers.
As Ricardo Reyes suggested, if it contains numbers then do:
myList = ','.join(map(str, myList))