Skip to content

Instantly share code, notes, and snippets.

@hanksudo
Created May 22, 2013 09:20
Show Gist options
  • Save hanksudo/5626311 to your computer and use it in GitHub Desktop.
Save hanksudo/5626311 to your computer and use it in GitHub Desktop.
[Python] calculate your age in days 計算你已經活了幾天
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