Share
@jmanning2k using a list comprehension has the downside of creating a new temporary list. The better solution would be using itertools.imap which returns an iterator
from itertools import imap l = [1, "foo", 4 ,"bar"] ",".join(imap(str, l))