Leetcode Array Rotation In Python