Continuous Subarray Sum - Leetcode 523 - Python