Maximum Contiguous Subarray Dynamic Programming Python