input: Write a function to convert an HTML string to plain text without using any libraries. The function should return the plain text.
  def html_to_text(html_string):
      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
  
  assert html_to_text("<p>Hello, <b>world</b>!</p>")=="Hello, world!"
  assert html_to_text("<html><body><h1>Title</h1><p>Paragraph</p></body></html>")=="TitleParagraph"
  assert html_to_text("<a href='#'>Link</a>")=="Link"
  assert html_to_text("")==""
  assert html_to_text("<div><span>Text</span></div>")=="Text"
output: def html_to_text(html_string):
      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