Python equivalent of Ruby's #find_index with lambda?

Viewed 227

In Ruby:

[[1,2],[2,3],[9,3]].find_index {|i| i.include?(3)}

Returns 1, which is the index of the first element in the array containing 3. Is there an equivalent to this in Python? I looked into List's index method, but it doesn't seem to take a lambda as an argument.

2 Answers
Related