-
-
Save parzibyte/c81b2666e1614d04f98163619f0236c0 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
def agregar_cero_si_es_necesario(valor): | |
return f"{valor:02d}" | |
numeros = [1, 2, 3, 55, 10, 100, 1000] | |
for numero in numeros: | |
print(agregar_cero_si_es_necesario(numero)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment