Two Subarrays Hackerrank Solution For Python 3