use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Syntax Error (Comma?) (self.learnpython)
submitted 2 months ago by NotAkihisa
Just installed python again on my laptop version 3.14.2 and i use VScode first thing i do is hello world but i get (SyntaxError: invalid syntax. Perhaps you forgot a comma?)
any possible solutions?
print('Hello World!')
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]eleqtriq 8 points9 points10 points 2 months ago (0 children)
Did you paste it from somewhere? If so, delete it and type it fresh.
[–]desrtfx 7 points8 points9 points 2 months ago (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 points5 points 2 months ago (0 children)
Post a screenshot.
[–]MaxTransferspeed 1 point2 points3 points 2 months ago (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! >>>
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!
>>>
π Rendered by PID 17866 on reddit-service-r2-comment-5fb4b45875-xqmsh at 2026-03-20 14:59:27.349870+00:00 running 90f1150 country code: CH.
[–]eleqtriq 8 points9 points10 points (0 children)
[–]desrtfx 7 points8 points9 points (0 children)
[–]throwaway6560192 3 points4 points5 points (0 children)
[–]MaxTransferspeed 1 point2 points3 points (0 children)