Last Updated: February 25, 2016
·
349
· diegocaridei

Use SQLite with Python

con= sqlite3.connect("sql3.db")#se non esiste lo crea
cursore=con.cursor()
cursore.execute("create table language (name text, mark integer )")
con.commit()
cursore.execute("insert into language values (?,?)",["python",10])
cursore.execute("insert into language values (?,?)",["perl",3])
con.commit()
cursore.execute("select * from language")
for row in cursore:
    print (row)