Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 14 Online
OpenStudy (anonymous):

is anyone getting an error message: Invalid syntax for print when writing script in Python 2.5.4? I am not able to fix it. is there any way to fix the error? thanks

OpenStudy (e.mccormick):

How are you writing your print statment? If you looked at how to do it in 3.x, that is different from 2.x. It is one of the major changes. They went from a print statement to a function. This function requires () and opens up many options the statment did not have.

OpenStudy (rsmith6559):

A Python2 print statement would be like: print "Hello World" A Python3 print function would be called like: print( "Hello World" )

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!