0

Hi! I'm using IDLE.

Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> test = 1
>>> if test:
	print "ok"
	
SyntaxError: invalid syntax (<pyshell#2>, line 2)
>>>

Does someone can help me?
Thanks.

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by tivrfoa
0

You're using python 3.0. print is no longer a statement, but a function, so you have to use print("ok"). I suggest you do some research on how py3k is different from python 2x before you attempt to use it.

0

You're using python 3.0. print is no longer a statement, but a function, so you have to use print("ok"). I suggest you do some research on how py3k is different from python 2x before you attempt to use it.

thanks!!!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.