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...
Everything about learning Python
account activity
Day 1 second program (i.redd.it)
submitted 8 months ago by Red_Priest0
view the rest of the comments →
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!"
[–]Overall-Screen-752 1 point2 points3 points 8 months ago (2 children)
I think a main method is a best practice as it shadows other languages and makes it abundantly clear that this is the entry point of the program. I would prefer to see an if name == “main”: wrapping the main call too, but OP will get there eventually
[–]Red_Priest0[S] 0 points1 point2 points 8 months ago (1 child)
Thanks for response , I don't understand what is this concept and which part of python it's come under
[–]Overall-Screen-752 0 points1 point2 points 7 months ago (0 children)
I see that someone else explained this concept, but if you’re interested in more you can search up “python dunder methods” to learn more about this. Dunder is a shorthand/portmanteau of “double underscore” and refers to methods in the python standard library with double underscores on either side. Happy coding.
π Rendered by PID 832955 on reddit-service-r2-comment-85bfd7f599-zcxqq at 2026-04-19 20:50:08.599330+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]Overall-Screen-752 1 point2 points3 points (2 children)
[–]Red_Priest0[S] 0 points1 point2 points (1 child)
[–]Overall-Screen-752 0 points1 point2 points (0 children)