On Tue, May 13, 2008 at 4:05 PM, globalrev <[EMAIL PROTECTED]> wrote:
> 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))

What's wrong with just using range()?

>>> range(10)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> range(1, 10)
[1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> range(1, 11)
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>> range(1, 11, 2)
[1, 3, 5, 7, 9]
>>>

-- 
Jerry
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to