def login(usr,pwd):
conn = sqlite3.connect('obj.db')
cursor = conn.cursor()
log_sql = 'SELECT pwd, id, turma, periodo FROM professores WHERE usr = ? AND pwd = ?'
cursor.execute(log_sql,(usr,pwd))
for i in cursor.fetchall():
print(i)
if cursor.fetchall():
pass#I would like to return the id of the user who compared it in if
else:
print('login errado')
login(usr,pwd)