From 3933fac94435b2fe3fd5d35a0975dde4b48c3051 Mon Sep 17 00:00:00 2001 From: Prajwal <40351128+TheDaemonLord@users.noreply.github.com> Date: Thu, 3 Oct 2019 16:35:46 +0530 Subject: [PATCH] Update snippets/median.md Co-Authored-By: Angelos Chalaris --- snippets/median.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/median.md b/snippets/median.md index aa63231bb..3d38bc5a9 100644 --- a/snippets/median.md +++ b/snippets/median.md @@ -4,7 +4,7 @@ tags: math,median,beginner --- 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 def median(list):