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.
If you want to play with this example on your own, feel free to fork and run this code sample at: