Debian Codegraph @

cpython27/Doc/includes/sqlite3/executemany_2.py

raw symbols SCIP
1 import sqlite3
2 import string
3
4 def char_generator():
5 for c in string.lowercase:
6 yield (c,)
7
8 con = sqlite3.connect(":memory:")
9 cur = con.cursor()
10 cur.execute("create table characters(c)")
11
12 cur.executemany("insert into characters(c) values (?)", char_generator())
13
14 cur.execute("select c from characters")
15 print cur.fetchall()