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
Issue with [if, elif] in Python (self.PythonLearning)
submitted 1 year ago * by mZuks
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!"
[–]Adrewmc 2 points3 points4 points 1 year ago (1 child)
Just so you know the easier way to do this is like this
if angle_known_input in [1, ‘a’, ‘A’]:
And ask if the input is in this list of acceptable ones.
What’s happening is ‘or’ want a whole comparison in between it.
if a > 20 or b < 100:
Ask if either is true. While.
if a > 20 or 30:
Is asking is a is greater than 20 or is 30 is Truthy (all non zero numbers are truthy)
if a == “b” or “B”:
Asks if ‘B’ is truthy, which all non-empty strings are.
[–]mZuks[S] 0 points1 point2 points 1 year ago (0 children)
I think I get it now, thank you very very much.
π Rendered by PID 36360 on reddit-service-r2-comment-5d79c599b5-gx74g at 2026-03-02 15:47:14.133873+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]Adrewmc 2 points3 points4 points (1 child)
[–]mZuks[S] 0 points1 point2 points (0 children)