Dynamically Programmed Max Subarray in Python