Suchen Sie die doppelte Zeile in der Python SQLite -Datenbank
for name in ('AlixaProDev','Salamn'):
cursor.execute("SELECT rowid FROM Student WHERE Name = ?", (name,))
db_result=cursor.fetchall()
if len(db_result)==0:
print('There is no Student named %s'%name)
else:
print('Student %s found with rowids %s'%(name,','.join(map(str, next(zip(*db_result))))))Copy Code
Pythonist