Driver Code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT k = [ 45 ] NEW_LINE root = newNode ( 1 ) NEW_LINE root . left = newNode ( 2 ) NEW_LINE root . right = newNode ( 3 ) NEW_LINE root . left . left = newNode ( 4 ) NEW_LINE root . left . right = newNode ( 5 ) NEW_LINE root . right . left = newNode ( 6 ) NEW_LINE root . right . right = newNode ( 7 ) NEW_LINE root . left . left . left = newNode ( 8 ) NEW_LINE root . left . left . right = newNode ( 9 ) NEW_LINE root . left . right . left = newNode ( 12 ) NEW_LINE root . right . right . left = newNode ( 10 ) NEW_LINE root . right . right . left . right = newNode ( 11 ) NEW_LINE root . left . left . right . left = newNode ( 13 ) NEW_LINE root . left . left . right . right = newNode ( 14 ) NEW_LINE root . left . left . right . right . left = newNode ( 15 ) NEW_LINE print ( " Tree ▁ before ▁ truncation " ) NEW_LINE Print ( root ) NEW_LINE print ( ) NEW_LINE DEDENT