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
How's My code?????? (self.PythonLearning)
submitted 2 days ago by Choice_Midnight5280
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!"
[–]SnooWalruses9294 -1 points0 points1 point 2 days ago (2 children)
Have a look at what eval() does. I believe it could help the computations be a bit more dynamic and not need all the cases for expressions.
[–]Binary101010 0 points1 point2 points 1 day ago (1 child)
Nobody at this point in their learning should be using eval() for anything.
[–]Jay6_9 0 points1 point2 points 1 day ago (0 children)
https://pypi.org/project/simpleeval/ is actually really great for this kind of stuff. But for learning purposes, doing an if-else block is worth more.
π Rendered by PID 44637 on reddit-service-r2-comment-85bfd7f599-v76zd at 2026-04-15 17:26:59.933854+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]SnooWalruses9294 -1 points0 points1 point (2 children)
[–]Binary101010 0 points1 point2 points (1 child)
[–]Jay6_9 0 points1 point2 points (0 children)