how to print comma separated list in python
- Last modified: 08 March 2020
- Category: python tutorial
in this article we'll learn how to print comma separated list in python.
Contents
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