how to print a list in str in python code example
Example 1: python print list as string
list1 = ['1', '2', '3']
str1 = ''.join(list1)
Example 2: print string elements in list python
# list having all elements are strings
strings = ['string1', 'string2', 'string3', 'string4']
for string in strings:
print(string)