#import the sqlite3 module
import sqlite3
#create a tble
with sqlite3.connect(':memory:') as conn:
#create a table
conn.execute('''
CREATE TABLE point(
id INTEGER PRIMARY KEY AUTOINCREMENT,
x INTEGER,
y INTEGER
)
''')
#populate table
conn.executescript('''
INSERT INTO point (x, y) VALUES (3, 4);
INSERT INTO point (x, y) VALUES (2, 3);
INSERT INTO point (x, y) VALUES (-2, 5);
''')
#retrieve data
cursor = conn.cursor()
cursor.execute('SELECT x, y FROM point;')
print(cursor.fetchall())
cursor.close()