1import sqlite3 2 3# Create a connection to the database file "mydb": 4con = sqlite3.connect("mydb") 5 6# Get a Cursor object that operates in the context of Connection con: 7cur = con.cursor() 8 9# Execute the SELECT statement: 10cur.execute("select * from people order by age") 11 12# Retrieve all rows as a sequence and print that sequence: 13print(cur.fetchall()) 14 15con.close() 16