I want to pad a number i
with a padding based on the value of the variable width
>>> width = 5
>>> i = 1
>>> print(f'{i:width}')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Invalid format specifier
>>>
>>> print('{:width}'.format(i))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Invalid format specifier
Desired output:
1