Let’s see how to calculate arithmetic mean in Python.

To calculate arithmetic average we need to import statistics module.

Luckily there is dedicated function in statistics module to calculate arithmetic mean.

import statistics as s x = [1, 5, 7, 8, 43, 6] mean = s.mean(x) print("Mean equals: " + str(round(mean, 2))) s.mean(x)