You are viewing a single comment's thread. Return to all comments →
if you want to reduce redundancy, why not also return the bool of the comparisons to avoid explicitly checking for zero equivalency..
def is_leap(year): return bool(not year % 4 and (year % 100 or not year % 400))
irregardless.. you deserve an upvote
Seems like cookies are disabled on this browser, please enable them to open this website
Write a function
You are viewing a single comment's thread. Return to all comments →
if you want to reduce redundancy, why not also return the bool of the comparisons to avoid explicitly checking for zero equivalency..
irregardless.. you deserve an upvote