You can find the mean in Python using NumPy with the following code. If you want to learn Python then I will highly recommend you to read This Book. Mean is the average of numbers. It can be calculated as Mean = Sum of Numbers / Total Numbers but NumPy has a built-in method to find the mean.
Mean of a List
import numpy as np a = [1,2,3,4,5,6] print(np.mean(a)) #Output 3.5
Mean of NumPy Array
import numpy as np c = np.array([1,2,3,4,5,6]) print(np.mean(c)) #Output 3.5
Mean of 2D NumPy Array
import numpy as np d = np.array([[1,2,3],[4,5,6]]) print(np.mean(d)) #Output 3.5