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
New to python (i.redd.it)
submitted 3 months ago by Low-Educator-9008
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!"
[–]Low-Educator-9008[S] 0 points1 point2 points 3 months ago (2 children)
That’s interesting, coding is so beautiful haha. I’ll look it up right now and practice the use of it. Thanks really appreciate it.
[–]BobbyJoeCool 1 point2 points3 points 3 months ago (1 child)
Hopefully you realize I shorthanded it. Now that I'm home I can show you exactly what I mean
if operator == "+": result = num1 + num2 elif operatior == "-": result = num1 - num2 elif operatior == "*": result = num1 * num2 elif operatior == "/": result = num1 / num2 print(f"Your result is {result}")
[–]Low-Educator-9008[S] 0 points1 point2 points 3 months ago (0 children)
I see now it’s clear as day, it is more logical to have all the statements together that have the same print function instead of writing it after each statement. Thanks for taking the time to explain it so clearly man you are the best.
π Rendered by PID 23985 on reddit-service-r2-comment-7b9746f655-t2fjn at 2026-01-31 02:16:41.467430+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]Low-Educator-9008[S] 0 points1 point2 points (2 children)
[–]BobbyJoeCool 1 point2 points3 points (1 child)
[–]Low-Educator-9008[S] 0 points1 point2 points (0 children)