syntax error : first python program

Anssi Saari as at sci.fi
Wed Dec 23 04:44:50 EST 2009


Ben Finney <ben+python at benfinney.id.au> writes:

>> bash# /usr/bin/python sample.py
>>   File "sample.py", line 2
>>     name = "blah"
>>     ^
>> SyntaxError: invalid syntax
>
> Indentation is syntax in Python.

At least here with Python 2.5.2 I get "IndentationError: unexpected
indent". I'm just wondering why would the OP get a SyntaxError?



More information about the Python-list mailing list