"""标签:20,填充,format,python,左中右,格式,print,对齐 From: https://blog.51cto.com/u_13137233/6094384
槽的格式限定
冒号:左边填序号或名称,右边填写格式
"""
# 右对齐的字符串,宽度为20
s1 = "{:>20}".format("hello")
print(s1)
# 右对齐,宽20,!填充
s2 = "{:!>20}".format("python")
print(s2)
# 左对齐,宽30,¥填充
s3 = "{:¥<30}".format("money")
print(s3)
# 居中对齐,宽20,*填充
s4 = "{:*^20}".format("left")
print(s4)