Skip to content

Instantly share code, notes, and snippets.

@c-yan
Created April 6, 2013 18:54
Show Gist options
  • Save c-yan/5327192 to your computer and use it in GitHub Desktop.
Save c-yan/5327192 to your computer and use it in GitHub Desktop.
1987/6/30 ~ 2013/4/5 の間に全ての数字が異なる日がないことを確認する
>>> import datetime
>>> x = datetime.datetime(1987, 6,30)
>>> while True:
... x += datetime.timedelta(days = 1)
... t = str(x.year) + str(x.month) + str(x.day)
... if len(t) == len(list(set(t))):
... break
...
>>> print x
2013-04-05 00:00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment