next(i for i, xs in enumerate([[1, 2], [2, 3], [9, 3]]) if 3 in xs)
next((i for i, xs in enumerate([[1, 2], [2, 3], [9, 3]]) if 999 in xs),
    'no-such-object')
Python equivalent of Ruby's #find_index with lambda?