I have a list like this
Use next with enumerate:
If there is not value as not zero, the None will be returned.
>>> myList = [0.0 , 0.0, 0.0, 2.0, 2.0]
>>> next((i for i, x in enumerate(myList) if x), None) # x!= 0 for strict match
3 # The first index to have value with true value which means not zero
Source From Here Question I need to capture the Now() date and time in the YYYY/mm/dd hh:m:sec format . It needs to be in GMT time. Ho...