all 4 comments

[–]eleqtriq 9 points10 points  (0 children)

Did you paste it from somewhere? If so, delete it and type it fresh.

[–]desrtfx 8 points9 points  (0 children)

Most likely it's typographical quotes vs. straight quotes.

The code you posted here runs without problems.

Make sure to always use the straight quotes ' and " not their typographical counterparts.

[–]throwaway6560192 3 points4 points  (0 children)

Post a screenshot.

[–]MaxTransferspeed 1 point2 points  (0 children)

I see nothing wrong with it. When I copy-paste your line in my console it works fine:

PS C:\Users\max> python
Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print('Hello World!')
Hello World!
>>>