I have a list like this:
myList = [0.0, 0.0, 0.0, 2.0, 2.0]
I would like to find the location of the first number in the list that is not equal to zero.
myList.index(2.0)
It works in this example, but sometimes the first nonzero number will be 1 or 3.
Is there a fast way of doing this?