On Fri, 12 Oct 2007, Kent Johnson wrote: > Dick Moores wrote: > > > I'm just not comfortable with list comprehensions yet, > > Hmm, too bad. I use list comps and generator expressions constantly.
It took me a while to get list comprehensions. It's one of those things that suddenly snaps into place and you're suddenly comfortable with. What took me the longest time is to realize that it's really a way of generating one list from another list. Once I got that, I started naturally turning to list comprehensions whenever I found myself generating one list from another. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor