输出结果之间不能用+连接吗?这样为什么错了
d = { 'Adam': 95, 'Lisa': 85, 'Bart': 59, 'Paul': 74 }
sum = 0.0
for k, v in d.items():
sum = sum + v
print k+':'+v
print 'average', ':', sum/4
d = { 'Adam': 95, 'Lisa': 85, 'Bart': 59, 'Paul': 74 }
sum = 0.0
for k, v in d.items():
sum = sum + v
print k+':'+v
print 'average', ':', sum/4
2016-03-23
举报