可以便捷的通过 < 或者 >
符号来调整字符串填充。
>>> greetings = "hello"
>>> f"She says {greetings:>10}"
'She says hello'
# Pad 10 char to the right
>>> f"{greetings:>10}"
' hello'
>>> f"{greetings:<10}"
'hello '
# You can omit the < for left padding
>>> f"{greetings:10}"
'hello

>>> a = "1"
>>> b = "21"
>>> c = "321"
>>> d = "4321"
>>> print("\n".join((f"{a:>10}", f"{b:>10}", f"{c:>10}", f"{d:>10}")))
1
21
321
4321