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.

11 lines
204 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=? and age=?", (who, age))
  7. print(cur.fetchone())