> On May 9, 2018, at 07:14, kevin hulshof <kevinhuls...@live.nl> wrote:
> 
> Hello,
> 
> Is there a function that allows you to grab the numbers between two numbers?
> 
> Eg. If you input the numbers 1 and 4
> To make a list like this [1,2,3,4]

One option is range

range(1,5)

>>> range(1,5)
[1, 2, 3, 4]

https://docs.python.org/2/library/functions.html#range

— 
David Rock
da...@graniteweb.com




_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to