You are viewing a single comment's thread. Return to all comments →
If a year is a leap year: 1. it can be evenly divided by 4 and NOT evenly divided by 100; OR 2. it can be evenly divided by 400
leap = False if any([year % 4 == 0 and year % 4 != 0, year % 400 == 0]): leap = True
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 a year is a leap year: 1. it can be evenly divided by 4 and NOT evenly divided by 100; OR 2. it can be evenly divided by 400