(纯小白)为什么运行错误呢?
print('第一种方式, 普通方式')
template = 'Life is short,{}'
a = 'you need Python'
result = template.format(a)
print(result)
print('第二种方式, 指定顺序')
template = 'life {0} short,{1}need {2}.'
result = template.format('is','you','Python')
print(result)