Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

seconds add zero python

print(a_number)
#OUTPUT
123
number_str = str(a_number)
#Convert `a_number` to a string


zero_filled_number = number_str.zfill(5)
#Pad `number_str` with zeros to 5 digits

print(zero_filled_number)
#OUTPUT
00123
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #seconds #add #python
ADD COMMENT
Topic
Name
7+8 =