Created
September 27, 2012 19:58
-
-
Save briandailey/3796133 to your computer and use it in GitHub Desktop.
method to check a year to see if it's a leap year.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
is_leap_year = lambda x: x % 400 == 0 or (x % 100 != 0 and x % 4 == 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment