DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
how to format integer to two digit in python
You can achieve this using formatted string num = 1 number = f"{num:02}" -------------- output: "01"
Source by www.kite.com #
PREVIOUS
NEXT
Tagged:
#format
#integer
#digit
#python
ADD COMMENT
Topic
COMMENT
Name
4+1 =
Submit