第一个 format 第二个 arr
前边format,后边arr,如有帮助,请采纳!
print('{0} = {1}'.format(exp, sum(arr)))这是字符串的format()方法0,1表示format参数的顺序, 可以省略