There is a statistics library if you are using python >= 3.4
https://docs.python.org/3/library/statistics.html
You may use it's mean method like this. Let's say you have a list of numbers of which you want to find mean:-
list = [11, 13, 12, 15, 17]import statistics as ss.mean(list)
It has other methods too like stdev, variance, mode, harmonic mean, median etc which are too useful.