Maximum Subarray Leetcode Solution In Python Iteration