Driver Code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT root = newNode ( 1 ) NEW_LINE root . left = newNode ( 2 ) NEW_LINE root . right = newNode ( 3 ) NEW_LINE print ( " Density ▁ of ▁ given ▁ binary ▁ tree ▁ is ▁ " , density ( root ) ) NEW_LINE DEDENT