結果 : check if parentheses are balanced python