input: from typing import List, Tuple
  
  def execute_sql_in_python(database_name: str, table_name: str, category: str) -> List[Tuple]:
      """ Re-writes an SQL query in Python to fetch data from a specified category in a table.
      >>> execute_sql_in_python('movies.db', 'Movies', 'horror')
      [(1, 'MovieName1', 'horror'), (2, 'MovieName2', 'horror')]
      """
      import sqlite3
      
      conn = sqlite3.connect(database_name) 
      cursor = conn.cursor()
      
      cursor.execute(f"SELECT * FROM {table_name} WHERE category = '{category}'")
      
      result = cursor.fetchall()
      for row in result:
          print(row)
      
      conn.close()
      return result
output:     import sqlite3
      
      conn = sqlite3.connect(database_name) 
      cursor = conn.cursor()
      
      cursor.execute(f"SELECT * FROM {table_name} WHERE category = '{category}'")
      
      result = cursor.fetchall()
      for row in result:
          print(row)
      
      conn.close()
      return result