Created
May 22, 2013 09:20
-
-
Save hanksudo/5626311 to your computer and use it in GitHub Desktop.
[Python] calculate your age in days 計算你已經活了幾天
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime, timedelta | |
print '你已經活了', (datetime.now() - datetime(1985, 1, 30)).days, '天' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment