input: def balanced_brackets(brackets: str):
      """ brackets is a sequence consisting of "<" and ">".
      return True if each opening bracket matches with a closing bracket.
  
      >>> balanced_brackets("<")
      False
      >>> balanced_brackets("<>")
      True
      >>> balanced_brackets("<<><>>")
      True
      >>> balanced_brackets("><<>")
      False
      """
output:     
      balance = 0
      for bracket in brackets:
          if bracket == "<":
              balance += 1
          elif bracket == ">":
              balance -= 1
          if balance < 0:
              return False
      return balance == 0
  