class Solution(object):
def levelOrderBottom(self, root):
"""
:type root: TreeNode
:rtype: List[List[int]]
"""
if not root:
return []
ans = []
now = [root]
while now:
ans.insert(0, [i.val for i in now])
now = [j for i in now for j in (i.left, i.right) if j]
return ans
Simple and easy understanding Python solution


@七等星 Depends on how well you know python actually. If you know the insert() function in python I think it is probably easy to understand why the author says it it easy to understand.