Amazon Interview Question

Code how you calculate the median in python