I know that in Python 3.6+ we can use f-strings to format numbers with a width and precision:
f"{value:{width}.{precision}}"
So I did the following:
>>> print(f"My number: {31072021:015.1f}")
My number: 00000031072021.0
Now if I try the same code without a 0 before the 15 in the {width} specifier, then I get the following
>>> print(f"My number: {31072021:15.1f}")
My number: 31072021.0
Now, is it possible to specify my own padding character instead of the default space or zero 0 characters?
Thanks for the help!