-
-
Save parzibyte/a31a84c2631da3e9e7a16193b15068c5 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 | |
navidad = datetime.strptime("2021-12-25", "%Y-%m-%d") | |
fin_anio = datetime.strptime("2021-12-31", "%Y-%m-%d") | |
diferencia = fin_anio-navidad | |
print(f"La diferencia es de {diferencia.days} días y {diferencia.seconds} segundos. La diferencia total es de {diferencia.total_seconds()} segundos") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment