list:
['a','b']
Expected List:
['a,b']
Is there a pythonic way to do this?
list:
['a','b']
Expected List:
['a,b']
Is there a pythonic way to do this?
l2 = [','.join(l)]
There's not much point to wrapping this output in a list, though. It'd probably make more sense to just get the string:
joined_string = ','.join(l)