Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Median by sebastian009
def checkio(data):
while len(data)>2:
a = min(data)
c = data.index(a)
data.pop(c)
b = max(data)
d = data.index(b)
data.pop(d)
if len(data) == 2:
return (float(data[0])+float(data[1]))/2
else:
return data[0]
Oct. 17, 2016