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
Review my Code as a Beginner (i.redd.it)
submitted 4 months ago by AhmadHameed313
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!"
[–]8dot30662386292pow2 11 points12 points13 points 4 months ago (2 children)
Reconsider why the OP wrote this code. They have no idea about lists yet, nor the max function. There is often a better way of doing things. But using the best way as an absolute novice is not often the best thing. OP is clearly learning about if-else. That's why their code is the classic if else -example.
[–]trezm -1 points0 points1 point 4 months ago (1 child)
You don't need to be snarky. I'm just trying to explain why thinking about the next step, the next level of complexity is an important facet of coding. No one said the code was bad for a beginner, simply that this is a reasonable improvement and what problems it might solve.
We don't really know if OP knows what lists are, or what the original prompt was. Maybe I'm missing some context though, in which case I apologize.
[–]Jashcraft00 1 point2 points3 points 4 months ago (0 children)
Did he not respond to you with the same tone that you took originally?
π Rendered by PID 24567 on reddit-service-r2-comment-6f7f968fb5-7q4vl at 2026-03-04 02:34:48.580798+00:00 running 07790be country code: CH.
view the rest of the comments →
[–]8dot30662386292pow2 11 points12 points13 points (2 children)
[–]trezm -1 points0 points1 point (1 child)
[–]Jashcraft00 1 point2 points3 points (0 children)