mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
Average median type hint (#4483)
* Update average_median.py * Wikipediad link added
This commit is contained in:
parent
95a4957d9e
commit
0eabdb54b1
@ -1,6 +1,10 @@
|
||||
def median(nums):
|
||||
from typing import Union
|
||||
|
||||
|
||||
def median(nums: Union[int, float]) -> Union[int, float]:
|
||||
"""
|
||||
Find median of a list of numbers.
|
||||
Wiki: https://en.wikipedia.org/wiki/Median
|
||||
|
||||
>>> median([0])
|
||||
0
|
||||
|
Loading…
Reference in New Issue
Block a user