May-26-2019, 08:16 AM
Ah okay so you want to add leading zeroes.
You can use string formatting to do this very easily.
print(f'{number:0(length)}')
eg:
You can use string formatting to do this very easily.
print(f'{number:0(length)}')
eg:
>>> print(f'{10:020}') 00000000000000000010