Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sqlite3
- conn = sqlite3.connect("my.db")
- conn.execute("INSERT INTO celebs VALUES ('Kanye West', 100)")
- conn.execute("INSERT INTO celebs VALUES ('Kim Kardashian', 10000000)")
- # Save (commit) the changes
- conn.commit()
- # We can also close the connection if we are done with it.
- # Just be sure any changes have been committed or they will be lost.
- conn.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement