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