Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python add 0 before number

a = [1, 10]
for num in a:
    print (str(num).rjust(2, '0'))

>>> 01
>>> 10
 
PREVIOUS NEXT
Tagged: #python #add #number
ADD COMMENT
Topic
Name
1+8 =