Let\'s assume I\'m creating a simple class to work similar to a C-style struct, to just hold data elements. I\'m trying to figure out how to search a list of objects for ob
Just for completeness, let's not forget the Simplest Thing That Could Possibly Work:
for i in list: if i.n == 5: # do something with it print "YAY! Found one!"