0
Why do I have to do it like: print ('Hello') and not: print "hello"??
3 ответов
+ 4
cause in python3 parenthesis are must
+ 2
You are calling a function called print, so you need to show what you are passing as the parameters with the parenthesis.
0
That is actually one of the biggest differences between python 2 and python 3. Or, at least, the one people encounter most often :)
In python 2, "print" was a statement. In python 3, it is a function. And a function is always called by using parentheses.
https://docs.python.org/3/whatsnew/3.0.html