Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Median by IlyaM66
def checkio(data):
data = sorted(data)
if len(data) % 2 == 0:
return (data[int(len(data) / 2 - 1)] + data[int(len(data) / 2)]) / 2
else:
return data[len(data) // 2]
Feb. 24, 2015