input: def matching_paren(s: str) -> bool:
      """ Checks if a given string s has matching parentheses.
      >>> matching_paren("(a + b)")
      True
      >>> matching_paren(")(a + b)(")
      False
      """
output:     stack = []
      for char in s:
          if char == '(':
              stack.append(char)
          elif char == ')':
              if not stack:
                  return False
              stack.pop()
      return len(stack) == 0