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