input:                         
  def re_write_sql_query_in_python(database_name: str, table_name: str, category: str) -> None:
      """ Converts an SQL query into a Python code that connects to a SQLite database and executes the query.
      The query selects all columns from a specified table where a category matches a given value.
      Example:
      re_write_sql_query_in_python('movies.db', 'Movies', 'horror')
      will output:
      conn = sqlite3.connect('movies.db') 
      cursor = conn.cursor()
      cursor.execute("SELECT * FROM Movies WHERE category = 'horror'")
      result = cursor.fetchall()
      for row in result:
          print(row)
      conn.close()
      """
      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()
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()