print a string from a list python code example
Example 1: python print list as string
list1 = ['1', '2', '3']
str1 = ''.join(list1)
Example 2: how to print from a python list
list = ['a', 'b']
print(list[0])
#that will print 'a'
#print(list[1]) will print 'b'
Example 3: print only strings in list python
list1 = [1, 'string', 2, 'string2']
for ele in list1:
if(type(ele) == str):
print(ele)