PyDocs

Nav

Numeric and Mathematical Modules

median

statistics

function (source)
  • median(data)
Return the median (middle value) of numeric data.

When the number of data points is odd, return the middle data point.
When the number of data points is even, the median is interpolated by
taking the average of the two middle values:

>>> median([1, 3, 5])
3
>>> median([1, 3, 5, 7])
4.0
1 Example
>>> median([1, 3, 5])
3
from the Python docs
See Also
No see-alsos for statistics/median
0 Notes
No notes for median