We assume that input is a valid postfix and expect an operator .
else : NEW_LINE INDENT op1 = s [ 0 ] NEW_LINE s . pop ( 0 ) NEW_LINE op2 = s [ 0 ] NEW_LINE s . pop ( 0 ) NEW_LINE s . insert ( 0 , " ( " + op2 + i + op1 + " ) " ) NEW_LINE DEDENT