how to print comma separated list in python

in this article we'll learn how to print comma separated list in python.

syntax


','.join(your_list)

example


#list
array = ['morocco', 'france', 'italy', 'japan', 'spain']

#print list with comma
join = ','.join(array)

#print
print(join)


output

morocco,france,italy,japan,spain

English today is not an art to be mastered it's just a tool to use to get a result