Amazon interview question

Code how you calculate the median in python