-- coding:utf-8 -- class TreeNode: def init(self, x): self.val = x self.left = None self.right = None class Solution: # 返回从上到下每个节点值列表,例:[1,2,3] def PrintFromTopToBottom(self, root): # write code here if root==None: return [] support=[root] #先形成一个队列 ret=[] while support: #当删除了support[0]时如何接着进行循环 pri...