List Comprehension Syntax

Ville Vainio ville at spammers.com
Sat Jul 10 11:50:40 EDT 2004


>>>>> "Eric" == Eric S Johansson <esj at harvee.org> writes:

    >> It helps if your mental model involves manipulating lots of
    >> lists. I've found that the list manipulation model works great
    >> for me,

    Eric> well, I do manipulate a few lists but more often, I
    Eric> manipulate dictionaries.  I tend to think more in terms of
    Eric> sets, bags and queues.

These work as sequences (by lists, I meant sequences) as
well. Especially as we get genexps, LCish operations can be performed
for free without space penalty.

    Eric> if you want to take on a bigger (open source) project, I
    Eric> have one you can work on.  ;-)

No doubt ;-). 

    Eric> I will show you what I create the easiest which I can guarantee you
    Eric> will be a iterative solution.  then maybe we can work through the
    Eric> process of converting it to a list comprehension.

Sounds like a plan.

-- 
Ville Vainio   http://tinyurl.com/2prnb



More information about the Python-list mailing list