Answers for "python print all strings in list"

1

how to print a list of strings in python

lst = ["we", "are", "strings"]
for i in lst:
  print(i)
Posted by: Guest on August-08-2021
1

how to print from a python list

list = ['a', 'b']
print(list[0])
#that will print 'a'
#print(list[1]) will print 'b'
Posted by: Guest on July-22-2020
0

print only strings in list python

list1 = [1, 'string', 2, 'string2']
for ele in list1:
    if(type(ele) == str):
        print(ele)
Posted by: Guest on May-14-2020

Code answers related to "python print all strings in list"

Python Answers by Framework

Browse Popular Code Answers by Language