From 260005fc16869d9f0a4b1944b0192f9956d61c06 Mon Sep 17 00:00:00 2001 From: sawan sirswal <47943050+sawan1130@users.noreply.github.com> Date: Thu, 1 Oct 2020 14:14:44 +0530 Subject: [PATCH] Update database.py formatting --- database.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/database.py b/database.py index 702c559..08a575d 100644 --- a/database.py +++ b/database.py @@ -5,15 +5,15 @@ import sqlite3 def main(): - db=sqlite3.connect("information.db") - db.row_factory=sqlite3.Row + db = sqlite3.connect("information.db") + db.row_factory = sqlite3.Row db.execute("create table if not exists Admin(Name text,age int)") db.execute("insert into Admin (Name,age) values (? , ?)",("Hussein",26)) db.execute("insert into Admin (Name,age) values (? , ?)",("Jena",1)) db.commit() #db.execute("delete from Admin where name='Jena'") #db.execute("Update Admin set age=2 where name='Jena'") - cusror=db.execute("select * from Admin") + cusror = db.execute("select * from Admin") for row in cusror: print("Name:{}, Age:{}".format(row["Name"],row["age"]))