Dennis Sweeney added the comment:
The help text says this:
>>> help(list.index)
Help on method_descriptor:
index(self, value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
Emphasis
New submission from Tk44 :
Let us define a list where there are some duplicate elements. If we loop
through that list as "for i in my_list" and print the index by
my_list.index(i); the index doesn't change.
e.g.
my_list = [1,1,1,1,3]
for elm in my_list:
print(my_list.index(elm))