import sqlite3
db = sqlite3.connect('server.sqlite')
cur = db.cursor()
cur.execute("""CREATE TABLE IF NOT EXISTS _Users_ (name TEXT)""")
UserName = input("Ваш ник?: ")
cur.execute("INSERT INTO _Users_(name) VALUES (?)", (UserName,))
db.commit()
rows = cur.execute("SELECT * FROM _Users_")
for i in rows:
print("Вот все ники: ", i)
for obj in d.values():
for key, value in obj.items():
print(key, ":", value)