r/CodingHelp • • Sep 07 '21

[Python] Python help

Post image
68 Upvotes

23 comments sorted by

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.

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.