# list having all elements are strings strings = ['string1', 'string2', 'string3', 'string4'] for string in strings: print(string)
list1 = [1, 'string', 2, 'string2'] for ele in list1: if(type(ele) == str): print(ele)