Re: list displays

2011-01-08 Thread Steven D'Aprano
On Sat, 08 Jan 2011 22:57:45 +0100, Olive 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] This is called a list comprehension, not list display. > Does anyone know a good docume

Re: list displays

2011-01-08 Thread Chris Rebert
On Sat, Jan 8, 2011 at 1:57 PM, Olive 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

Re: list displays

2011-01-08 Thread Daniel da Silva
They're called "List Comprehensions" http://docs.python.org/tutorial/datastructures.html#list-comprehensions On Sat, Jan 8, 2011 at 4:57 PM, Olive wrote: > I am a newbie to python. Python supports what I thinks it is call

list displays

2011-01-08 Thread Olive
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/