Skip to content

Instantly share code, notes, and snippets.

View Jainu-s's full-sized avatar
🎯
Focusing

Jainmiah Shaik Jainu-s

🎯
Focusing
View GitHub Profile
@shahri23
shahri23 / gist:1804a3acb7ffb58a1ec8f1eda304af1a
Created December 2, 2016 02:17
Python code to show age in years, months, days, ...seconds
# Figure out your age
import datetime
currentDate = datetime.datetime.now()
deadline= input ('Plz enter your date of birth (mm/dd/yyyy) ')
deadlineDate= datetime.datetime.strptime(deadline,'%m/%d/%Y')
print (deadlineDate)
daysLeft = deadlineDate - currentDate
print(daysLeft)