Created
August 25, 2024 16:15
-
-
Save mfaughn/35784a6593cdebc9aaec950c130b7e40 to your computer and use it in GitHub Desktop.
This file contains 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 | |
now = datetime.now() | |
birthday = datetime(1972,2,11) | |
diff = now - birthday | |
# diff is type datetime.timedelta | |
# print(diff) | |
print('You are ' + str(diff.total_seconds()) + ' seconds old.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment