append right and left children of temp1 . Note that right child is inserted before left
if ( temp1 . right != None ) : NEW_LINE INDENT s1 . append ( temp1 . right ) NEW_LINE DEDENT if ( temp1 . left != None ) : NEW_LINE INDENT s1 . append ( temp1 . left ) NEW_LINE temp1 = s1 . pop ( - 1 ) NEW_LINE DEDENT