Hi
Say I have:
t = (
('dog', 'Dog'),
('cat', 'Cat'),
('fish', 'Fish'),
)
And I need to check if a value is in the first bit of the nested tuple (ie. the lowercase bits). How can I do this? The capitalised values do not matter really, I want to search for a string in only the lowercase values.
if 'fish' in t:
print "Fish in t."
Doesn't work.
Is there a good way of doing this without doing a for loop with if statements?