Skip to content

How to calculate mean in Python?

import statistics

a = [1,2,3,4,5]

mean = statistics.mean(a) 
#Similar for other values such as variance, standard deviation
See also  How to add list numbers in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.