Skip to content

Instantly share code, notes, and snippets.

@browneye1826
Last active February 13, 2022 07:58
Show Gist options
  • Save browneye1826/9011740e306ce5a9e5d58363d65a6cf4 to your computer and use it in GitHub Desktop.
Save browneye1826/9011740e306ce5a9e5d58363d65a6cf4 to your computer and use it in GitHub Desktop.
def is_leap_year(year: int) -> bool:
"""Return True if the given year is a leap year, False otherwise
Args:
year (int): an integer representing the year
Returns:
A boolean value.
"""
return year % 400 == 0 if year % 100 == 0 else year % 4 == 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment