list displays

Daniel da Silva ddasilva at umd.edu
Sat Jan 8 17:11:00 EST 2011


They're called "List Comprehensions"
http://docs.python.org/tutorial/datastructures.html#list-comprehensions

<http://docs.python.org/tutorial/datastructures.html#list-comprehensions>

On Sat, Jan 8, 2011 at 4:57 PM, Olive <not0read0765 at yopmail.com> wrote:

> I am a newbie to python. Python supports what I thinks it is called
> list display, for example:
>
> [i for i in range(10)]
> [i for i in range(10) if i<6]
>
> Does anyone know a good documentation for this. I have read the
> language reference but it is confusing.
>
> Olive
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110108/a400a7fb/attachment-0001.html>


More information about the Python-list mailing list