this seems to be the only solution so far that isn't a hack...
>>> mylist = [1,2,3] >>> ','.join("'{0}'".format(x) for x in mylist) "'1','2','3'"
this can also be written more compactly as:
>>> ','.join(map("'{0}'".format, mylist)) "'1','2','3'"
this seems to be the only solution so far that isn't a hack...
this can also be written more compactly as: