Leetcode 399 Python Recursively List