list comprehension

tac-tics tactics40 at gmail.com
Thu Jun 29 13:50:46 EDT 2006


a wrote:
> can someone tell me how to use them
> thanks

sigh...
You do a google on them:

http://docs.python.org/tut/node7.html#SECTION007140000000000000000

They are the program equivalent of set builder notation in math:

{x | x in S} 

would be written 

[x for x in S]

in python.




More information about the Python-list mailing list