I need to convert a list (or a dict) into a comma-separated list for passing to another language.
Is there a nicer way of doing this than:
result = '' args = ['a', 'b', 'c', 'd'] i = 0 for arg in args: if i != 0: result += arg else: result += arg + ', ' i += 1 result = 'function (' + result + ')
Thanks, Dan
produces