Leetcode Split Array Python Question