Return the median (middle value) of numeric data, using the common “mean of middle two” method. If data is empty, StatisticsError is raised.
statistics.median(data)
>>> median([1, 3, 5]) 3