Konversi 1 digit menjadi 2 digit ular piton
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"