How to create a comma-separated string from a list in Python

1 Answer

0 votes
lst = ["python", "java", "c#", "php", "c++", "c"]

s = ",".join(lst)

print(s)


'''
run:

python,java,c#,php,c++,c

'''

 



answered Nov 13, 2017 by avibootz

Related questions

...