Leetcode Problem 4 Solution In Python An Array