how to return median value of list in python code example
Example 1: median of a list python
import statistics
lst = [1,3,6,13,27]
median_value = statistics.median(lst)
print(median_value)
Example 2: how to get median mode average of a python list
>>> import statistics
>>> statistics.mean([4, 8, 6, 5, 3, 2, 8, 9, 2, 5])
5.2