input: 
  def matching_paren(s: str) -> bool:
      """ Determine if a given string contains matching parentheses.
      The function uses a stack to keep track of opening parentheses '(' and 
      pops from the stack when a closing parenthesis ')' is encountered. 
      If the stack is empty at the end, all parentheses are properly matched.
      
      >>> matching_paren("(())")
      True
      >>> matching_paren("())(")
      False
      >>> matching_paren("(()")
      False
      >>> matching_paren("")
      True
      >>> matching_paren("((()))")
      True
      """
      stack = []
      for char in s:
          if char == '(':
              stack.append(char)
          elif char == ')':
              if len(stack) == 0:
                  return False 
              stack.pop()
      
      if len(stack) == 0:
          return True
      else:
          return False
  
output:     stack = []
      for char in s:
          if char == '(':
              stack.append(char)
          elif char == ')':
              if len(stack) == 0:
                  return False 
              stack.pop()
      
      if len(stack) == 0:
          return True
      else:
          return False