Skip to content

Instantly share code, notes, and snippets.

@nt92
Created May 24, 2019 17:14
Show Gist options
  • Select an option

  • Save nt92/e3f48d3532ee9c1496a65e66e44dd1dd to your computer and use it in GitHub Desktop.

Select an option

Save nt92/e3f48d3532ee9c1496a65e66e44dd1dd to your computer and use it in GitHub Desktop.
Create a SQLite database with Python
import sqlite3
conn = sqlite3.connect('entries.db')
cursor = conn.cursor()
cursor.execute("""CREATE TABLE entries (date text, entry text)""")
conn.commit()
conn.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment