input: 
  from typing import List
  
  def generate_table(genre: str, data: List[tuple]) -> str:
      """Generate HTML code for a table displaying the top 10 bestselling books in a specific genre.
      >>> generate_table('Fantasy', [('Harry Potter', 'J.K. Rowling', 'Fantasy', 1000000), 
      ('The Lord of the Rings', 'J.R.R. Tolkien', 'Fantasy', 900000)])
      '<table><tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr><tr><td>Harry Potter</td><td>J.K. Rowling</td><td>Fantasy</td><td>1000000</td></tr><tr><td>The Lord of the Rings</td><td>J.R.R. Tolkien</td><td>Fantasy</td><td>900000</td></tr></table>'
      """
      html = '<table>'
      html += '<tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr>'
      for item in data:
          title, author, genre, sales = item
          html += f'<tr><td>{title}</td><td>{author}</td><td>{genre}</td><td>{sales}</td></tr>'
      html += '</table>'
      return html
  
output:     html = '<table>'
      html += '<tr><th>Title</th><th>Author</th><th>Genre</th><th>Sales</th></tr>'
      for item in data:
          title, author, genre, sales = item
          html += f'<tr><td>{title}</td><td>{author}</td><td>{genre}</td><td>{sales}</td></tr>'
      html += '</table>'
      return html