import sqlite3
connection= sqlite3.connect('sqlite.db')
cursor = connection.cursor()
cursor.execute('''CREATE TABLE if not Exists Website
(Post text, Autor text, Views real)''')
post_text = 'this is a raw post'
post_author = 'alixapordev'
post_views = 6900
INSERT_QUERY = f"INSERT INTO Website VALUES ('{post_text}','{post_author}','{post_views}')"
cursor.execute(INSERT_QUERY)
# Save (commit) the changes
connection.commit()
# close connection
connection.close()
import sqlite3
# python data insert
conn = sqlite3.connect('TestDB.db')
name=input("enter your name
")
conutryID=int(input("enter your country id
"))
sql = f''' INSERT INTO CLIENTS(Client_Name,Country_ID,Date)
VALUES('{name}',"{conutryID}","30/3/2022") '''
conn.execute(sql)
conn.commit()
conn.close()