Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to prefix numbers with zero in python

print(f"{n:02}")
#wherein, if n is a single digit, it will be prefixed with one 0
 
PREVIOUS NEXT
Tagged: #prefix #numbers #python
ADD COMMENT
Topic
Name
1+1 =