I am having an issue to find the index of each similar values within a list.
Example:
b = ["a", "b", "a", "a", "b", "b"]
for x in b:
if "a" in x:
print(b.index(x))
my current results:
0
0
0
expected results:
0
2
3
(In my actual case we have two to 100 of similar values within a list so .index is not working well.)