Reverse Array Problem Leetcode Solutions Python