Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python how to make integer show 2 numbers

print("{:0*number of characters here*d}".format(my_integer))

# Example with two characters, one of which is a leading zero
print("{:02d}".format(2))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #integer #show #numbers
ADD COMMENT
Topic
Name
6+9 =