You have to add the colon to the end of the statement if this is an accurate representation of the statement so:

"for  i  in  range(len(list)):"  instead of "for  i  in  range(len(list))"


On 3/15/2011 2:01 AM, Sachin Kumar Sharma wrote:

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 __


--

_______________________________

Timothy W. Morneau

/National Semiconductor/

Phone: (303) 845-4108

Fax:(303) 845-4005

email: tim.morn...@nsc.com

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to