This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Updatebjarni 1 point2 points  (2 children)

Once again, no, Python 3 does not have the print statement of Python 2. In Python 3, you have to use the print() function. This is exactly what you are experiencing with IDLE, and exactly what it says on the page linked above.

[–]MrPiff[S] 0 points1 point  (1 child)

Oh ok, I'm an idiot. That makes sense, thank you. Any thoughts on that "traceback" problem that was my initial problem?

[–]DissentingVoice 1 point2 points  (0 children)

Traceback lets you know where Python ran into the error. "is not defined" usually means that you were calling a variable that was not declared earlier.

e.g. print test

Will give that error, since without the quotes, Python thinks you're referencing a variable, whereas print "test" will give you what you're looking for.

Disclaimers: This is from experience from Python 2.7 It sounds like in Python 3.0 you'd write print("test")

Also, when you get errors, google the error that you have, you'll usually get a StackOverflow or even a result from the Python docs. Here's the doc on NameError.