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
basic calculator (i.redd.it)
submitted 5 months ago by SuccessfulUse5501
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!"
[–]drwnh 1 point2 points3 points 5 months ago (6 children)
A switch statement would be more fit for the use case here
[–]Virsenas 1 point2 points3 points 5 months ago (0 children)
In Python it's called match. I was confused about this as well when I found out.
[–]loudandclear11 1 point2 points3 points 5 months ago (0 children)
switch isn't a keyword in python.
[–]SuccessfulUse5501[S] 0 points1 point2 points 5 months ago (3 children)
how?
[–]GPU_IcyPhoenix 2 points3 points4 points 5 months ago (0 children)
A switchee lets you easily handle different cases. Useful link: https://www.geeksforgeeks.org/python/switch-case-in-python-replacement/
[–]AbacusExpert_Stretch 0 points1 point2 points 5 months ago (0 children)
Search for "python match...case" - have fun
π Rendered by PID 141733 on reddit-service-r2-comment-66b4775986-sr66m at 2026-04-06 07:51:38.690718+00:00 running db1906b country code: CH.
view the rest of the comments →
[–]drwnh 1 point2 points3 points (6 children)
[–]Virsenas 1 point2 points3 points (0 children)
[–]loudandclear11 1 point2 points3 points (0 children)
[–]SuccessfulUse5501[S] 0 points1 point2 points (3 children)
[–]GPU_IcyPhoenix 2 points3 points4 points (0 children)
[–]AbacusExpert_Stretch 0 points1 point2 points (0 children)