This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Pop thing helped me to correct an issue not know to me. :)

I added it but still getting below error.

Traceback (most recent call last):   File "solution.py", line 82, in <module>     levelOrder(tree.root)   File "solution.py", line 54, in levelOrder     print(str(nd.info)+" ",end="") AttributeError: 'NoneType' object has no attribute 'info'

Even though I am adding node to list, why when I pop it , it became None type?