Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Last active April 25, 2020 10:12
Show Gist options
  • Save aniruddha27/a6fc5332be30c28851c0dab4c8f4b27b to your computer and use it in GitHub Desktop.
Save aniruddha27/a6fc5332be30c28851c0dab4c8f4b27b to your computer and use it in GitHub Desktop.
import calendar
d1 = datetime.now()
# leap year or not
calendar.isleap(d1.year) # Output True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment