On 09/08/06, Alan Gauld <[EMAIL PROTECTED]> wrote: > > all_types: > > <Storage {'type': 'childcare', 'id': 1, 'created': > > datetime.datetime(2006, 7, 26, 15, 18, 34, 887436)}> > > <Storage {'type': 'household', 'id': 2, 'created': > > datetime.datetime(2006, 7, 26, 15, 18, 34, 887436)}> > > ..... > > <Storage {'type': 'knews', 'id': 10, 'created': > > datetime.datetime(2006, 7, 26, 15, 18, 34, 887436)}> > > there is such a list > > > > how do i search for a particular string say teststring in this list > > This isn't a list in any sense that Python will recognise. > Can you show us the actual data structures please?
I think what he wants is: if 'teststring' in [s.type for s in all_types] ... -- John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor