Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import sqlite3
  2.  
  3. conn = sqlite3.connect("my.db")
  4.  
  5. conn.execute("INSERT INTO celebs VALUES ('Kanye West', 100)")
  6. conn.execute("INSERT INTO celebs VALUES ('Kim Kardashian', 10000000)")
  7.  
  8.  
  9. # Save (commit) the changes
  10. conn.commit()
  11.  
  12. # We can also close the connection if we are done with it.
  13. # Just be sure any changes have been committed or they will be lost.
  14. conn.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement