There are ways to calculate mean in Python
For Example:
cal_mean = [2,3,4,5,6,7]
print(sum(cal_mean)/ len(cal_mean))
Output
4.5
Another way to calculate mean in Python is by using Numpy
import numpy as np
cal_mean = [2,3,4,5,6,7]
np.mean(cal_mean)
Output
4.5