Update median.md

This commit is contained in:
Angelos Chalaris
2020-01-05 14:24:33 +02:00
committed by GitHub
parent ed8394afc8
commit 84ddb26382

View File

@ -7,7 +7,7 @@ Finds the median of a list of numbers.
Sort the numbers of the list using `list.sort()` and find the median, which is either the middle element of the list if the list length is odd or the average of the two middle elements if the list length is even.
[`median`](https://docs.python.org/3/library/statistics.html#statistics.median) provides similar functionality to this snippet.
[`statistics.median()`](https://docs.python.org/3/library/statistics.html#statistics.median) provides similar functionality to this snippet.
```py
def median(list):