Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 52915df4ddad5378f6c9c56e54089a42b29397e3 authored by Benjamin Peterson on 13 June 2009, 13:16:45 UTC
update the README to be a little more inspiring w/regards to stability
Tip revision: 52915df
insert_more_people.py
import sqlite3

con = sqlite3.connect("mydb")

cur = con.cursor()

newPeople = (
    ('Lebed'       , 53),
    ('Zhirinovsky' , 57),
  )

for person in newPeople:
    cur.execute("insert into people (name_last, age) values (?, ?)", person)

# The changes will not be saved unless the transaction is committed explicitly:
con.commit()
back to top