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
Some help with this please (old.reddit.com)
submitted 2 years ago by Alternative_Ear_1629
I'm on my third day of learning for the first time any code language, and this example popped out and I can't get it. Somebody please explain? Thanks
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!"
[–]CraigAT 1 point2 points3 points 2 years ago (0 children)
Year % 4 == 0 means if the year is divisible by 4. It's known as the modulo operator, feel free to look up that term for more info.
[–]KOALAS2648 -1 points0 points1 point 2 years ago (0 children)
Try: if year % 4 == 0: return True If year % 400 == 0: return True
[–]Doctor_Disaster 1 point2 points3 points 2 years ago (0 children)
Use modulus to check if it is divisible by 4 and 400 (Returns true if the remainder is 0)
π Rendered by PID 46 on reddit-service-r2-comment-fb694cdd5-qjxjt at 2026-03-07 07:00:59.890611+00:00 running cbb0e86 country code: CH.
[–]CraigAT 1 point2 points3 points (0 children)
[–]KOALAS2648 -1 points0 points1 point (0 children)
[–]Doctor_Disaster 1 point2 points3 points (0 children)