Do this as a list comprehension?

John Salerno johnjsal at
Tue Jun 10 15:24:16 CEST 2008

"Mensanator" <mensanator at> wrote in message 
news:f5cae6ab-292b-4bd4-a0c3-1862c9a455be at
On Jun 8, 9:40 pm, John Salerno <johnj... at> wrote:
> Mensanator wrote:

> Heh heh, don't worry. Every time I see a range function, I immediately
> think "creates a list". Not sure how I got into that habit, but it
> happens every time! :)

You probably got into that habit because that's
what it does in 2.x, create a list. Now, if
you're expecting that to happen you'll in for
a surprise when you switch to Py3, won't you?

Nah, I know about the change.It might be a slight adjustment at first, but 
probably a good one. 

More information about the Python-list mailing list