Function to perform tree pruning by performing post order traversal
def treePruning ( root , result ) : NEW_LINE INDENT if ( root == None ) : NEW_LINE INDENT return None ; NEW_LINE DEDENT root . left = treePruning ( root . left , result ) ; NEW_LINE root . right = treePruning ( root . right , result ) ; NEW_LINE DEDENT