return level of node
level = getlevel ( root , 30 ) NEW_LINE if level != 0 : NEW_LINE INDENT print ( " level ▁ of ▁ node ▁ 30 ▁ is " , level ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " node ▁ 30 ▁ not ▁ found " ) NEW_LINE DEDENT level = getlevel ( root , 12 ) NEW_LINE if level != 0 : NEW_LINE INDENT print ( " level ▁ of ▁ node ▁ 12 ▁ is " , level ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " node ▁ 12 ▁ not ▁ found " ) NEW_LINE DEDENT level = getlevel ( root , 25 ) NEW_LINE if level != 0 : NEW_LINE INDENT print ( " level ▁ of ▁ node ▁ 25 ▁ is " , level ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " node ▁ 25 ▁ not ▁ found " ) NEW_LINE DEDENT level = getlevel ( root , 27 ) NEW_LINE if level != 0 : NEW_LINE INDENT print ( " level ▁ of ▁ node ▁ 27 ▁ is " , level ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " node ▁ 27 ▁ not ▁ found " ) NEW_LINE DEDENT