I have a list that goes:
[1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1]
I'd like to print all the elements of the list with a value of greater than 2 but also print the position in the list, I can print the elements by themselves with:
for bonds in number_of_bonds:
if bonds >= 2:
print bonds
But if I use enumerate it will instead print all the items in the list with their position like this:
(0, 1)
(1, 1)
(2, 3)
etc
So what is the correct way to do this?