π±Example of Querying Data from Python
import sqlite3
con = sqlite3.connect('thenameofyoursqlitedatabase.db')
cursor = con.cursor()
resultset = cursor.execute("SELECT * FROM yourtablename")
for row in resultset:
print(row)
You can see the SQL code embedded in the Python code above. Essentially, the Python code is making a connection to the database and running the SQL code that the programmer specified.
Last updated