Skip to content

Instantly share code, notes, and snippets.

@briandailey
Created September 27, 2012 19:58
Show Gist options
  • Save briandailey/3796133 to your computer and use it in GitHub Desktop.
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.
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