Mercurial > cpython-lru_cache-weakref
view Doc/includes/sqlite3/execute_2.py @ 68401:45d76bb9fbcd 3.2
merge 3.1
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 12 Mar 2011 11:58:40 -0600 |
| parents | 9e1529bf0442 |
| children |
line wrap: on
line source
import sqlite3 con = sqlite3.connect("mydb") cur = con.cursor() who = "Yeltsin" age = 72 cur.execute("select name_last, age from people where name_last=:who and age=:age", {"who": who, "age": age}) print(cur.fetchone())
