The Hackerrank Solution For Python Example