SyntaxFix
Write A Post
Hire A Developer
Questions
Why would you use reduce() for this when Python has a perfectly cromulent sum() function?
reduce()
sum()
print sum(l) / float(len(l))
(The float() is necessary to force Python to do a floating-point division.)
float()