Skip to content
Advertisement

Calculating arithmetic mean (one type of average) in Python [duplicate]

Is there a built-in or standard library method in Python to calculate the arithmetic mean (one type of average) of a list of numbers?

Advertisement

Answer

I am not aware of anything in the standard library. However, you could use something like:

JavaScript

In numpy, there’s numpy.mean().

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement