多叉樹遍歷

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 =
相關文章
相關標籤/搜索