mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00: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.
|
Find median of a list of numbers.
|
||||||
|
Wiki: https://en.wikipedia.org/wiki/Median
|
||||||
|
|
||||||
>>> median([0])
|
>>> median([0])
|
||||||
0
|
0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user