📅  最后修改于: 2022-03-11 14:45:47.893000             🧑  作者: Mango
mystr = "peter"
width = 10
filler = '*'
print(f'Output: {mystr:{filler}<{width}}')
# -> 'Output: peter*****'
print(f'Output: {mystr:{filler}>{width}}')
# -> 'Output: *****peter'