db = [('cat',15,22),('dog',28,30),('human',27,80)]
Now I want to create search for 'dog' so my returned value will be db[1]
. I can't still figure it out (I know I would use sth like for item in db: if 'dog' in item[:]
but don't know how to put it together really.
Please help?