You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
212 B

  1. import sqlite3
  2. con = sqlite3.connect("mydb")
  3. cur = con.cursor()
  4. who = "Yeltsin"
  5. age = 72
  6. cur.execute("select name_last, age from people where name_last=:who and age=:age",
  7. locals())
  8. print(cur.fetchone())