same for tree2
temp2 = s2 . pop ( - 1 ) NEW_LINE while ( temp2 != None and not temp2 . isLeaf ( ) ) : NEW_LINE INDENT if ( temp2 . right != None ) : NEW_LINE INDENT s2 . append ( temp2 . right ) NEW_LINE DEDENT if ( temp2 . left != None ) : NEW_LINE INDENT s2 . append ( temp2 . left ) NEW_LINE DEDENT temp2 = s2 . pop ( - 1 ) NEW_LINE DEDENT