List comprehension confusion...

Bengt Richter bokr at oz.net
Sat Feb 1 22:45:29 EST 2003


On Sun, 02 Feb 2003 03:10:27 GMT, Afanasiy <abelikov72 at hotmail.com> wrote:

>I am confused about the purpose of list comprehensions.
>What can they do which an explicit for loop cannot?
Appear as a term in an expression.
Often, express creation of a list more clearly and concisely than otherwise.
...

Regards,
Bengt Richter




More information about the Python-list mailing list