Possible Duplicate:
SyntaxError near “print”?
I am a first time user of python. I just got Python 3.3 installed on my computer, got the PATH updated and attempted to run my first python program that I just copied and pasted from a tutorial into a new file. I get an error that reads:
File "C:\Users\bmahnke\Desktop\python.py", line 23
print 'string1 is: ', string1
SyntaxError: invalid syntax
I am not sure what the problem is because I got it from a tutorial site and I'm not certain, but almost, that they wouldn't put a file on there that doesn't compile. So I was wondering what I am doing wrong
Here is the python code that I am using:
#! C:\Python33\python.exe
string1 = 'In this class,'
string2 = 'I am learning to program in'
string3 = 'PYTHON.'
print 'string1 is: ', string1
print 'string2 is: ', string2
print 'string3 is: ', string3
print 'Put them altogether and you get:'
print string1, string2, string3
print string1 + string2 + string3
Any help is appreciated, thanks.