Reverse Array Hackerrank Solution In Python