[Tutor] range() help

2007-04-17 Thread python
Alright I'm a bit confused when looking at how range works. I'm reading lesson 4.3 in the python tutorial. http://docs.python.org/tut/node6.html I came across this: >>> range(-10, -100, -30) [-10, -40, -70] How come it prints on -40 or -70. Does -70 come from -70 -> -100? This is really confu

Re: [Tutor] range() help

2007-04-17 Thread Jan Erik Moström
Reply to [EMAIL PROTECTED] 07-04-17 07:42: >How come it prints on -40 or -70. > >Does -70 come from -70 -> -100? > >This is really confusing me. I don't really understand your question, the definition of range range(...) range([start,] stop[, step]) -> list of integers Return a list c

Re: [Tutor] range() help

2007-04-17 Thread Necmettin Begiter
On Tuesday 17 April 2007 14:42:50 [EMAIL PROTECTED] wrote: > >>> range(-10, -100, -30) > > [-10, -40, -70] > > How come it prints on -40 or -70. > > Does -70 come from -70 -> -100? > from -10 to -100 (excluding -100) -10-30 = -40 -40-30= -70 ___ Tutor mai