How to create a tree by Python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to create a tree by Python?

Pythons

29th Mar 2019, 6:41 AM
Joker_JAY
2 Answers
29th Mar 2019, 6:54 PM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
0
https://www.sololearn.com/learn/711/?ref=app Instead of writing things like left.left.right, implement functions like append() that traverse the tree recursive and append the node at the correct place.
29th Mar 2019, 11:23 PM
Chris
Chris - avatar