python sqlite - ghdrako/doc_snipets GitHub Wiki
import sqlite3
with con = sqlite3.connect("database.sqlite"):
# do your operations here
pass
import sqlite3
mydb = sqlite3.connect('demo.db')
mycr = mydb.cursor()
mycr.execute('create table login(UNAME text, UPASS text)')
mydb.commit()
mycr.execute("insert into login values(...)")
mydb.close()