searching a list of tuples in python

Posted by hdx on Stack Overflow See other posts from Stack Overflow or by hdx
Published on 2010-05-26T22:45:13Z Indexed on 2010/05/26 22:51 UTC
Read the original article Hit count: 264

Filed under:
|
|
|

So I have a list of tuple like:

[(1,"juca"),(22,"james"),(53,"xuxa"),(44,"delicia")]

I want this list for a tuple whose number value is equal to something.

So that if I do search(53) it will return 2

Is is an easy way to do that?

© Stack Overflow or respective owner

Related posts about python

Related posts about search