comefrom: <doocs>0020.Valid Parentheses_1.py
code: def isValid( s: str) -> bool:
      q = []
      parentheses = {'()', '[]', '{}'}
      for ch in s:
          if ch in '([{':
              q.append(ch)
          elif not q or q.pop() + ch not in parentheses:
              return False
      return not q
masked: def sample_funcname ( var_0 : str ) -> bool :
      var_3 = [ ]
      var_7 = { '()' , '[]' , '{}' }
      for var_8 in var_0 :
          if var_8 in '([{' :
              var_3.append ( var_8 )
          elif not var_3 or var_3.pop ( ) + var_8 not in var_7 :
              return False
      return not var_3
  