convertir 1 dígito a pitón de 2 dígitos
number = 10
print(number) #Output: 10
zero_filled_number = str(number).zfill(3)
print(zero_filled_number) #Output: "010"
Vitus
number = 10
print(number) #Output: 10
zero_filled_number = str(number).zfill(3)
print(zero_filled_number) #Output: "010"
You can achieve this using formatted string
num = 1
number = f"{num:02}"
--------------
output:
"01"