Skip to content

Instantly share code, notes, and snippets.

@myano
Created March 29, 2016 23:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myano/ae5536021185bed005fdcc08e1ba433a to your computer and use it in GitHub Desktop.
Save myano/ae5536021185bed005fdcc08e1ba433a to your computer and use it in GitHub Desktop.
Non-submitted solution for COhPy's 201602 challenge, (https://github.com/cohpy/challenge-201602-leapday).
#!/usr/bin/env python3
## This works in Python 2 and Python 3
import datetime as dt
for x in range(2020, 1000000, 4):
t = dt.datetime(x, 2, 29)
if t.weekday() == 0:
print("Found it! {0}".format(x))
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment