Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
example solution in Clear category for Median by Noru
def checkio(data):
data.sort()
a = len(data)
if a % 2 == 0:
return (data[int(a/2)] + data[int(a/2 - 1)])/2
else:
b = int(a/2 - 0.5)
return data[b]
Oct. 4, 2014