1>>> l = [1, 2, 3]
2>>> print(' '.join(str(x) for x in l))
31 2 3
4>>> print(' '.join(map(str, l)))
51 2 3
1# list having all elements are strings
2strings = ['string1', 'string2', 'string3', 'string4']
3for string in strings:
4 print(string)
1items = [1,2,3,4,5,6]
2
3#print with [] brackets separated by ','
4print(items)
5
6#print using operator
7print(*items)
8
9#print using for
10for i in items:
11 print(i)
12
13#print using for and len function
14for i in range(len(items)):
15 print(items[i])
16
17#you can also add sep and end methods to the print statement accordingly
1# using for loop
2scores = [11, 12, 13, 14, 15, 16]
3for score in scores:
4 print(score)
1list = ['a', 'b']
2print(list[0])
3#that will print 'a'
4#print(list[1]) will print 'b'