Python wylicz w rozumieniu listy za pomocą instrukcji 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"]