convert 1 digit to 2 digit python

Solutions on MaxInterview for convert 1 digit to 2 digit python by the best coders in the world

showing results for - "convert 1 digit to 2 digit python"
Meg
11 Aug 2016
1number = 10
2print(number) #Output: 10
3zero_filled_number = str(number).zfill(3)
4print(zero_filled_number) #Output: "010"