这是我在python中的程序我必须获取单个数据并希望存储在变量中,我可以将其与我的实时数据进行比较
import sqlite3 as lite
con = lite.connect("test.db")
cur=con.cursor()
cur.execute("select * from CardData where CardId =?",[num])
result1 = cur.fetchone()
row1 = result1[0]
row2 = result1[1]
if not row1 == num and row2 == "40":
do this