return报错
sum = 0.0
for x in d.values():
sum = sum + x
return sum
print sum / len(d)
#ptthon2.7运行报错:
#return sum SyntaxError: 'return' outside function
#这个报错是什么意思?
sum = 0.0
for x in d.values():
sum = sum + x
return sum
print sum / len(d)
#ptthon2.7运行报错:
#return sum SyntaxError: 'return' outside function
#这个报错是什么意思?
2016-12-02
举报