[Tutor] Tuple and Dicts?

Basil Shubin bashu at yandex.ru
Thu Nov 9 19:09:54 CET 2006


Hi friends!

Imagine the tuple that has dictionaries as it's item:

>>> print data
({'id': 0, 'title': 'Linux'}, {'id': 1, 'title': 'FreeBSD'})

How I can get index of tuple item where dict's key 'id' equal to
appropriate value? And can this be done without 'for' loops, just in one
string?

-- 
Basil Shubin
Freelance Software Developer




More information about the Tutor mailing list