Answers for "python how to show your age"

1

how to use datetime to tell your age in python

today_date = datetime.datetime.now()
dob = datetime.datetime(1982, 5, 20)
print(today_date - dob)
Posted by: Guest on July-08-2021

Code answers related to "python how to show your age"

Python Answers by Framework

Browse Popular Code Answers by Language