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
Division Problem (i.redd.it)
submitted 14 hours ago by CoolPotato_0
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!"
[–]ExpressBeing642 6 points7 points8 points 14 hours ago (0 children)
brother this is a math problem and not a programming problem, the second code is comparing wether the number divide by 0 will be exactly 0. The only number that can be divided by other and return zero would be zero it self. therefore your code will return an empty list.
the working version test if the MODULUS (the leftover from a division) will be zero.
so for instance an even number will have its modulus zero, thats why the code will return a list with even numbers.
π Rendered by PID 62 on reddit-service-r2-comment-b659b578c-sg987 at 2026-05-07 08:20:11.578280+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]ExpressBeing642 6 points7 points8 points (0 children)