nums = [11, 2,4, 2, 5]
for i in nums:
print(nums.index(i),i )
I run the above code and it uses same index for similar elements(here 2 at index 1 and 3). I wasn't aware of this python list behavior, does it mean the use of lists can be restrictive for similar elements in same list?