comefrom: <qiyuangong>020_Valid_Parentheses_1.py
code: def isValid( s):
      if s is None:
          return True
      stack = []
      for t in s:
          if t == ')':
              try:
                  current = stack.pop()
                  if current != '(':
                      return False
              except:
                  return False
          elif t == '}':
              try:
                  current = stack.pop()
                  if current != '{':
                      return False
              except:
                  return False
          elif t == ']':
              try:
                  current = stack.pop()
                  if current != '[':
                      return False
              except:
                  return False
          else:
              stack.append(t)
      if len(stack) == 0:
          return True
      else:
          return False
masked: def sample_funcname ( var_0 ) :
      if var_0 is None :
          return True
      var_3 = [ ]
      for var_4 in var_0 :
          if var_4 == ')' :
              try :
                  var_7 = var_3.pop ( )
                  if var_7 != '(' :
                      return False
              except :
                  return False
          elif var_4 == '}' :
              try :
                  var_7 = var_3.pop ( )
                  if var_7 != '{' :
                      return False
              except :
                  return False
          elif var_4 == ']' :
              try :
                  var_7 = var_3.pop ( )
                  if var_7 != '[' :
                      return False
              except :
                  return False
          else :
              var_3.append ( var_4 )
      if len ( var_3 ) == 0 :
          return True
      else :
          return False
  