Питона перечислена в понимании списка с оператором if
my_list = [0,1,2]
[i for i, w in enumerate((_ for _ in my_list if _ != 1)) ]
Tirbo06
my_list = [0,1,2]
[i for i, w in enumerate((_ for _ in my_list if _ != 1)) ]
mylist = ["a","b","c","d"]