human
I found an interesting problem on https://leetcode.com/problems/binary-tree-postorder-traversal/:
Given a binary tree, return the postorder traversal of its nodes' values.

Example:

Input: [1,null,2,3]
   1
    \
     2
    /
   3

Output: [3,2,1]

Follow up: Recursive solution is trivial, could you do it iteratively?

I tried it in Python, but could not do it. Can you solve it?
assistant
#Here is the Python program you requested.

# Definition for a binary tree node.
 # class TreeNode:
 #     def __init__(self, x):
 #         self.val = x
 #         self.left = None
 #         self.right = None
 
 class Solution:
     def __init__(self):
         self.l=[]
     def postorderTraversal(self, root):
         """
         :type root: TreeNode
         :rtype: List[int]
         """
         if root == None:
             return []
         self.postorderTraversal(root.left)
         self.postorderTraversal(root.right)
         self.l.append(root.val)
         return self.l