con = sqlite3.connect("mydatabase1.db")
# If you want to create a table or insert data into the table, declare a cursor
cur = con.cursor()
# By using execute, we can create a table and execute the table
cur.execute('''
CREATE TABLE IF NOT EXISTS students (
name VARCHAR(50),
rollno VARCHAR(50),
section VARCHAR(50)
)
''')
con.commit()
cur.execute('INSERT INTO students VALUES ("sai", "511A", "sectionA")')
cur.execute('INSERT INTO students VALUES ("ramesh", "512A", "sectionB")')
cur.execute('INSERT INTO students VALUES ("raju", "513A", "sectionC")')
con.commit()
con.close()