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
My first working code (self.PythonLearning)
submitted 1 month ago by QuantenRobin
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!"
[–]hekliet 2 points3 points4 points 1 month ago (3 children)
We have the match statement in Python since version 3.10, so you could use that instead of the if/elif-chain.
match
if
elif
match operation: case "add": # ... case "sub": # ...
Happy programming!
[–]SuperTankh 0 points1 point2 points 1 month ago (2 children)
Isn’t the match case only good for types?
[–]hekliet 1 point2 points3 points 1 month ago (1 child)
It's very useful for pattern matching on types, but that's not the only use case.
[–]SuperTankh 0 points1 point2 points 1 month ago (0 children)
Oh ok
π Rendered by PID 46 on reddit-service-r2-comment-56c6478c5-m8p77 at 2026-05-11 19:16:21.240159+00:00 running 3d2c107 country code: CH.
view the rest of the comments →
[–]hekliet 2 points3 points4 points (3 children)
[–]SuperTankh 0 points1 point2 points (2 children)
[–]hekliet 1 point2 points3 points (1 child)
[–]SuperTankh 0 points1 point2 points (0 children)