Problems with range

Tyler Eaves tylere at gmail.com
Sat Jun 26 04:43:51 CEST 2004


On Fri, 25 Jun 2004 19:06:39 -0400, Adrian Albisser wrote:

> Hey to everybody, im just beginning to program in python. So i was trying
> some function but always when i try the range function i get a error
> message.
> 
> for number in range(1,100):
> print number
> 

Try:


for number in range(1,100):
  print number
^^
Note the intention.

Basically, any time you have a line ending in :, you'll need to indent
the following line (and maybe more).




More information about the Python-list mailing list