Median Updates Hackerrank Solution For Python Range