Answers for "python how to use zeroes"

1

python pad with zeros

>>> n = '4'
>>> print(n.zfill(3))
004
Posted by: Guest on April-09-2021
0

how to add trailing zeros in python

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

Python Answers by Framework

Browse Popular Code Answers by Language