f = lambda n:sum(sorted(n*4)[len(n):-len(n)])/len(n)/2 print(f([1,3,4,5,6,6,7,7,8,8,9,38]))print(f([1,3,5,7,9,11,13,15,17]))
Standard input is empty
6.5 9.0
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!