[Tutor] odd

David Rock david at graniteweb.com
Thu Jul 19 03:01:36 CEST 2007


* elis aeris <hunter92383 at gmail.com> [2007-07-19 08:51]:
> I ran this
> 
> 
> for x in range(5,10):
>    print x
> 
> and OP was
> 
> 5
> 6
> 7
> 8
> 9
> 
> why is that? shouldn't it print
> 
> 5
> 6
> 7
> 8
> 9
> 10?

That is the expected behaviour, per the documentation:
http://docs.python.org/lib/built-in-funcs.html#l2h-58

-- 
David Rock
david at graniteweb.com


More information about the Tutor mailing list