input: Write a function to convert a list of dictionaries to an HTML table.
  assert html_from_dict([{'Name': 'Alice', 'Age': 30}, {'Name': 'Bob', 'Age': 25}]) == '<table><tr><th>Name</th><th>Age</th></tr><tr><td>Alice</td><td>30</td></tr><tr><td>Bob</td><td>25</td></tr></table>'
  assert html_from_dict([{'Product': 'Widget', 'Price': 100}, {'Product': 'Gadget', 'Price': 200}]) == '<table><tr><th>Product</th><th>Price</th></tr><tr><td>Widget</td><td>100</td></tr><tr><td>Gadget</td><td>200</td></tr></table>'
  assert html_from_dict([{'City': 'New York', 'Population': 8000000}, {'City': 'Los Angeles', 'Population': 4000000}]) == '<table><tr><th>City</th><th>Population</th></tr><tr><td>New York</td><td>8000000</td></tr><tr><td>Los Angeles</td><td>4000000</td></tr></table>'
output: def html_from_dict(dict_list):
      if not dict_list:
          return '<table></table>'
      
      headers = dict_list[0].keys()
      table = '<table>'
      
      # Add headers
      table += '<tr>'
      for header in headers:
          table += f'<th>{header}</th>'
      table += '</tr>'
      
      # Add rows
      for dictionary in dict_list:
          table += '<tr>'
          for header in headers:
              table += f'<td>{dictionary[header]}</td>'
          table += '</tr>'
      
      table += '</table>'
      return table