1
0

Using zfill in utils.pad

This commit is contained in:
lightmare 2023-02-18 19:09:25 +00:00
parent 1f4cdcb8a9
commit 4807072894

View File

@ -120,11 +120,7 @@ def setup_args():
return args
def pad(num, zeroes):
s = ""
for i in range(zeroes,0,-1):
if num < 10 ** i:
s = f"{s}0"
return f"{s}{num}"
return str(num).zfill(zeroes+1)
def generate(
text,