You are on page 1of 1

/home/pablo/Dropbox/02 - Docencia/Paradigmas de Programación/code/python/trees.

py

1 def preorder(T):
2 if not T is None:
3 yield T[0]
4 for x in preorder(T[1]):
5 yield x
6 for x in preorder(T[2]):
7 yield x

1 of 1 02/21/2018 10:06 PM

You might also like