https://leetcode.com/problems/sum-root-to-leaf-numbers


Runtime: 28 ms, faster than 85.92% of Python3 online submissions for Sum Root to Leaf Numbers.
Memory Usage: 14.3 MB, less than 20.10% of Python3 online submissions for Sum Root to Leaf Numbers.



```python
result = 0

def travel(sum_list: List, node: TreeNode):
    global result
    if node == None:
        return
    else:
        new_sum_list = sum_list+[str(node.val)]
        #print(new_sum_list)
        if (node.left != None):
            travel(new_sum_list, node.left)
        if (node.right != None):
            travel(new_sum_list, node.right)
        if (node.left == None and node.right == None):
            #print(new_sum_list)
            sum = int("".join(new_sum_list))
            result += sum

class Solution:
    def sumNumbers(self, root: TreeNode) -> int:
        global result
        #7:28
        result = 0
        travel([], root)
        return result
        #7:34
        #debug until 7:51
```
