So I'm starting to work my way through Alan's online
book, reading, then typing in code and seeing it work.
The following is a snippet of code in the Loops
section. I'm getting an error message.

Here's the code and error message:

 myList = [1,2,3,4]
 for index in range(len(myList)):
    myList[index] += 1
 print myList

  File "<stdin>", line 3
    print myList
        ^
SyntaxError: invalid syntax

can someone tell me what the syntax error is, and how
to correct it?

my thanks, ron







       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to