Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Median by maxadamski
def checkio(data):
data.sort()
i = (len(data) - 1) // 2
if len(data) % 2 == 0:
return (data[i] + data[i + 1]) / 2
else:
return data[i]
Oct. 19, 2017