Answers for "how to add trailing zeroes to string"

0

how to add trailing zeros in python

text = "hello"
print(text.zfill(10))
Output: '00000hello'
Posted by: Guest on July-16-2021
0

how to add trailing zeros in the number

['{0:05d}'.format(s) for s in range(100)]
Posted by: Guest on July-16-2021

Code answers related to "how to add trailing zeroes to string"

Python Answers by Framework

Browse Popular Code Answers by Language