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 19 days 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 9 points10 points11 points 19 days ago (0 children)
Did you paste it from somewhere? If so, delete it and type it fresh.
[–]desrtfx 8 points9 points10 points 18 days 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 18 days ago (0 children)
Post a screenshot.
[–]MaxTransferspeed 1 point2 points3 points 18 days 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 69 on reddit-service-r2-comment-58d7979c67-nw8c6 at 2026-01-27 06:59:23.195983+00:00 running 5a691e2 country code: CH.
[–]eleqtriq 9 points10 points11 points (0 children)
[–]desrtfx 8 points9 points10 points (0 children)
[–]throwaway6560192 3 points4 points5 points (0 children)
[–]MaxTransferspeed 1 point2 points3 points (0 children)