I am trying to iterate over the items of a numpy array using a for loop. Is there a way to keep track of the index of the current item of the iteration (other than initializing a counter before the loop and increment it inside the loop)?
myArray = [4 5 6 7]
for item in myArray:
print(index of item)
What I would like to get is (keeping in mind that this is a numpy array, not a list)
0
1
2
3