input: Write a function to generate an HTML table displaying information about the top 10 bestselling books in a specific genre from a given database. The function should connect to a SQLite database named 'books.db', execute a query to retrieve the required data, and then construct an HTML table to display the results. If the genre specified does not exist, the function should return an empty string.
  assert generate_html_table('Fantasy')=="<table><tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr><tr><td>Book1</td><td>Author1</td><td>Fantasy</td><td>1000</td></tr><tr><td>Book2</td><td>Author2</td><td>Fantasy</td><td>900</td></tr></table>"
  assert generate_html_table('Sci-Fi')=="<table><tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr><tr><td>Book3</td><td>Author3</td><td>Sci-Fi</td><td>800</td></tr><tr><td>Book4</td><td>Author4</td><td>Sci-Fi</td><td>700</td></tr></table>"
  assert generate_html_table('Non-existent')==""
  assert generate_html_table('')==""
output: 
  import sqlite3
  
  def generate_html_table(genre):
      conn = sqlite3.connect('books.db')
      cursor = conn.cursor()
      cursor.execute("SELECT Title, Author, Genre, Sales FROM books WHERE Genre=? ORDER BY Sales DESC LIMIT 10", (genre,))
      rows = cursor.fetchall()
      conn.close()
      
      if not rows:
          return ""
      
      html = "<table><tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr>"
      for row in rows:
          html += f"<tr><td>{row[0]}</td><td>{row[1]}</td><td>{row[2]}</td><td>{row[3]}</td></tr>"
      html += "</table>"
      
      return html
  