This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: can we add a median function
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Ananthakrishnan, vstinner
Priority: normal Keywords:

Created on 2020-01-28 13:28 by Ananthakrishnan, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg360873 - (view) Author: Ananthakrishnan (Ananthakrishnan) * Date: 2020-01-28 13:28
add a function called 'median' that we can use like:

list=[1,2,3,4,5,6,7,8,9]     # declaring list

median(list)      #returns 5
msg360874 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-01-28 13:33
It already exists since Python 3.4:
https://docs.python.org/dev/library/statistics.html#statistics.median

Enjoy!
History
Date User Action Args
2022-04-11 14:59:25adminsetgithub: 83659
2020-01-28 13:33:09vstinnersetstatus: open -> closed

nosy: + vstinner
messages: + msg360874

resolution: fixed
stage: resolved
2020-01-28 13:28:13Ananthakrishnancreate