You are here : python_3statisticsstatisticsmedian

statistics.median() - statistics

Return the median (middle value) of numeric data, using the common “mean of
middle two” method.  If data is empty, StatisticsError is raised.


Syntax

statistics.median(data)


Example

>>> median([1, 3, 5])
3


Output / Return Value


Limitations


Alternatives / See Also


Reference