built in list generator?

Diez B. Roggisch deets at nospam.web.de
Tue May 13 16:16:52 EDT 2008


globalrev schrieb:
> if i want  a list with all numbers between x and y is there a way to
> do this with an inbult function.
> 
> i mean i can always construct a function to do this but is there
> soemthing like:
> 
> nbrs = list(range(50,100, 2))

range *does* that. use xrange if all you want is to iterate.

Diez



More information about the Python-list mailing list