fork download
  1. inp = ('Бананы', [1, 2], ('Stepik',), 'Яблоки', '', 'Макароны', 5, True)
  2. for i, v in enumerate(x for x in inp if x and isinstance(x, str)):
  3. print(i,v)
Success #stdin #stdout 0.02s 9028KB
stdin
Standard input is empty
stdout
0 Бананы
1 Яблоки
2 Макароны