>> please suggest what could have gone wrong here why am i getting a
>> syntax error
It's a quirk of the interactive interpreter. To terminate a loop you need a
blank input line:
>>> some_list = [3,6,2,5]
>>> i = 1
>>> while i < 3:
... print some_list[i], ";"
... i = i + 1
...
6 ;
2 ;
>>> print some_list[3]
5
--
Skip Montanaro - [email protected] - http://www.smontanaro.net/
America's vaunted "free press" notwithstanding, story ideas that expose
the unseemly side of actual or potential advertisers tend to fall by the
wayside. Not quite sure why. -- Jim Thornton
_______________________________________________
Pythonmac-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig