input: 
  def html_to_text(html_string: str) -> str:
      """ Converts given HTML string to plain text by removing all tags.
      >>> html_to_text("<div>Hello, <b>world</b>!</div>")
      'Hello, world!'
      >>> html_to_text("<p>This is a <a href='#'>link</a>.</p>")
      'This is a link.'
      """
      output = ''
      in_tag = False
      for char in html_string:
          if char == '<':
              in_tag = True
          elif char == '>':
              in_tag = False
          elif in_tag == False:
              output += char
      return output
  
output:     output = ''
      in_tag = False
      for char in html_string:
          if char == '<':
              in_tag = True
          elif char == '>':
              in_tag = False
          elif in_tag == False:
              output += char
      return output