input: 
  def html_to_text(html_string: str) -> str:
      """
      Converts HTML to plain text by removing all HTML tags.
  
      >>> html_to_text('<html><body><h1>Title</h1><p>This is a paragraph.</p></body></html>')
      'TitleThis is a paragraph.'
      >>> html_to_text('<div><b>Bold</b> and <i>italic</i> text.</div>')
      'Bold and italic text.'
      """
      output = ''
      in_tag = False
      for char in html_string:
          if char == '<':
              in_tag = True
          elif char == '>':
              in_tag = False
          elif not in_tag:
              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 not in_tag:
              output += char
      return output