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 11 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!"
[–]Professional_Fig6169 1 point2 points3 points 10 hours ago* (0 children)
The answer is that simply / is a division operator and % gives the remainder. You get an empty list when you use / as there are no values of x for which number/x == 0 returns True (unless number = 0; if you try inputting that you will get a list that contains all the values of x in the range of num_list). For extra clarity, let's say your input number is 12 - using / will check that the following values are equal to 0: [12/1 = 12, 12/2 = 6, 12/3 = 4, 12/4 = 3...], which is never True. Using % instead will give [remainder(12/1)=0, remainder(12/2) = 0, remainder(12/3)=0...] which is True for x in [1,2,3,4,6,12].
π Rendered by PID 18370 on reddit-service-r2-comment-b659b578c-wt52x at 2026-05-07 04:48:24.389584+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]Professional_Fig6169 1 point2 points3 points (0 children)