a = "Python"
b = "="
c = ">"
print("{0:{1}{3}{2}}".format(a, b, 25, c))
print("{0:=>25}".format(a, b, 25, c))
{0(format参数索引):(相当于python2中的%)=(空格处填充)>(’:'前的东西右对齐)25(最小宽度)}
{:e}与{0:e}是一样的,即:之前的索引默认为0
>>> '{:,}'.format(100000000000000000000000)
'100,000,000,000,000,000,000,000'
>>>
‘{: - <^>(不能缺否则会报错:ValueError: Invalid format specifier) 50 , . 2 bcdoxX eEf%}’.format(100000000000000000000000)
a = "Python"
b = "="
c = ">"
print("{0:{1}{3}{2}}".format(a, b, 25, c))