mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Move the 3k reST doc tree in place.
This commit is contained in:
parent
739c01d47b
commit
116aa62bf5
423 changed files with 131199 additions and 0 deletions
16
Doc/includes/sqlite3/insert_more_people.py
Normal file
16
Doc/includes/sqlite3/insert_more_people.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
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()
|
Loading…
Add table
Add a link
Reference in a new issue