【发布时间】:2015-01-08 15:10:06
【问题描述】:
我做错了什么?
print('script executed in {time}{1:.2f} seconds'.format(time=elapsed_time))
我明白了:
IndexError: tuple index out of range
预期输出:
script executed in 0.12 seconds
【问题讨论】:
标签: python string formatting