import sqlite3 as sql con = sql.connect('database.db') cur = con.cursor() truepass = '' print('!reg to register, !lin to log in') command00 = input() if command00 == '!reg': username = input('Your name: ') userpass = input('Your pass: ') cur.execute("INSERT INTO users(name, pass) VALUES(?, ?)", [username, userpass]) con.commit() cur.close() con.close() if command00 == '!lin': entername = input('Enter name: ') enterpass = input('Enter pass: ') cur.execute("SELECT pass INTO truepass FROM users WHERE name = entername") print(truepass)