Update snippets/median.md

Co-Authored-By: Angelos Chalaris <chalarangelo@gmail.com>
This commit is contained in:
Prajwal
2019-10-03 16:35:46 +05:30
committed by GitHub
parent 752006c582
commit 3933fac944

View File

@ -4,7 +4,7 @@ tags: math,median,beginner
--- ---
Find the median of a list of numbers Find the median of a list of numbers
Sort the numbers of the list using the sort function and find the median, which is the middlemost element of the list. 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..
```py ```py
def median(list): def median(list):