多叉树遍历

import nltk.tree as tree # 递归遍历 def test(t): if isinstance(t, str): print t else: for i in range(len(t)): test(t[len(t)-i-1]) # 非递归遍历 def test_2(t): stack =
相关文章
相关标签/搜索