newbie question (for loop)

Sachin Kumar Sharma SSharma84 at slb.com
Tue Mar 15 04:01:08 EDT 2011


BB,

I am getting error on the following syntax while running in Ipython and spyder and I failed to figure out why

for  i  in  range(len(list))

Error

for  i  in  range(len(list))
                                         ^
SyntaxError: invalid syntax

where list is a list defined as a collection of words and it is OK prints fine.

Kindly advise.

Cheers

Sachin

************************************************************************
Sachin Kumar Sharma
Senior Geomodeler

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110315/df551a4d/attachment.html>


More information about the Python-list mailing list