Hi!
(Python 2.2.3 if this is relevant :-)
I have a list of objects with, lets say, the attributes "ID", "x" and
"y". Now I want to find the index of list element with ID=10.
Of course I can loop through the list manually, but is there a
construct like
list.find (10, key='ID')
? Thanks for your ideas.
Best regards,
Martin
(Python 2.2.3 if this is relevant :-)
I have a list of objects with, lets say, the attributes "ID", "x" and
"y". Now I want to find the index of list element with ID=10.
Of course I can loop through the list manually, but is there a
construct like
list.find (10, key='ID')
? Thanks for your ideas.
Best regards,
Martin
Comment