+ 1
Is it possible to use print"hello world" instead of print('hello world')?? What difference will it make.
6 Answers
+ 4
In python 3.5 you must use print(). I think this is the difference
+ 1
print "hello world" would give an error - the code is incorrect due to the missing parentheses. print('hello world') and print("hello world") are both correct and output the same text (hello world). In python strings can be enclosed in either single or double quotation signs.
+ 1
@vismaya yea, you can.
+ 1
yes you can use print"something" in python 2.x
0
so can i use the syntax print"hello world" without () in python 2.x ??
0
yes u can