First Python list index greater than x?

next(x[0] for x in enumerate(L) if x[1] > 0.7)

Leave a Comment