title: SQLite won't save data?
body: <p>I'm using Python and I'm trying to use SQLite, however when I execute a command it never saves to the table.</p>
  
  <pre><code># SQLite
  # -
  con = sqlite3.connect("comment_data")
  c = con.cursor()
  c.execute("CREATE TABLE IF NOT EXISTS comments (id TEXT)")
  def insert(id):
      c.execute("INSERT INTO comments VALUES ('%s')" % id)
  
  def exists(id):
      c.execute("SELECT 1 FROM comments WHERE id = '%s'" % id)
      if c.fetchone() is None:
          return False
      else:
          return True
  
  def commentCount():
      c.execute("SELECT * FROM comments")
      for row in c:
          print(row)
  
  def close():
      c.close()
  # -
  #
  </code></pre>
  
  <p>When I execute <code>insert("random")</code> and run <code>commentCount()</code> it prints it. However when I close the Python application and run <code>commentCount()</code> it prints <code>None</code>. So how do I save data to the DB?</p>