Leetcode Nested Array Python Example Code