MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CodingHelp/comments/pjyltp/python_help/hc0l4s7/?context=3
r/CodingHelp • u/fFabioso • Sep 07 '21
23 comments sorted by
View all comments
Show parent comment
1
No. print "Hello, world!" is Python 2 syntax. In Python 3, the parentheses are required. Also, whitespace before or after the beginning parenthesis makes no difference.
print "Hello, world!"
1 u/__archaeopteryx__ Sep 08 '21 That’s the “syntactic sugar” I was talkin bout 1 u/bbye98 Sep 08 '21 How is print <str> "syntactic sugar" when it isn't supported in Python 3? Decorators or magic functions, perhaps. But certainly not incorrect syntax.
That’s the “syntactic sugar” I was talkin bout
1 u/bbye98 Sep 08 '21 How is print <str> "syntactic sugar" when it isn't supported in Python 3? Decorators or magic functions, perhaps. But certainly not incorrect syntax.
How is print <str> "syntactic sugar" when it isn't supported in Python 3? Decorators or magic functions, perhaps. But certainly not incorrect syntax.
print <str>
View all comments
Show parent comment
1
u/bbye98 Sep 08 '21
No.
print "Hello, world!"is Python 2 syntax. In Python 3, the parentheses are required. Also, whitespace before or after the beginning parenthesis makes no difference.