changeset 1 | 2fb8b9db1c86 |
0:ffa851df0825 | 1:2fb8b9db1c86 |
---|---|
1 import sqlite3 |
|
2 |
|
3 def char_generator(): |
|
4 import string |
|
5 for c in string.letters[:26]: |
|
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() |