FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpython/Doc/includes/sqlite3/insert_more_people.py at tkinter_docs · native-api/cpython · GitHub
native-api
cpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpython
/
Doc
/
includes
/
sqlite3
/
insert_more_people.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (11 loc) · 334 Bytes
Breadcrumbs
cpython
/
Doc
/
includes
/
sqlite3
/
insert_more_people.py
Copy path
File metadata and controls
16 lines (11 loc) · 334 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
()
Back
|
FazBrowse Home
|
New Git URL