import mysql.connector
mydb = mysql.connector.connect(host="localhost", user="", passwd="", db="world")
cursor = mydb.cursor()
file = open('C:\\test\\File.txt', 'w')
file_content = file.write()
query = "SELECT * FROM city where name='kabul'"
cursor.execute(query, (file_content,))
mydb.commit()
mydb.close()
Here i'm storing the data in text file but error
name 'file_content' is not defined