Comment

Martin P.

Hi, at least it works with a different single char instead of a whitespace...

>>> mystr = "hello"

>>> f'{mystr:<10}'
'hello '

>>> f'{mystr:X<10}'
'helloXXXXX'

>>> foo = 'XYZ'

>>> f'{mystr:{foo}<10}'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Invalid format specifier