title: python dictionary into sqlite
body: <p>I have built a sqlite db and table in Python 2.7 with 6 variables, based on reading a URL file. </p>
  
  <p>I used JSON and created a dictionary. The code reads everything well and loops through the keys and values. </p>
  
  <p>I need to insert this into my table. That is where I am a little lost. I will provide the code and I think my hole will be obvious.</p>
  
  <pre><code>import json
  import urllib2
  #Read file and print a line
  webFD=urllib2.urlopen("http://rasinsrv07.cstcis.cti.depaul.edu/CSC455/assignment4.txt")
  tweet = webFD.readline()
  tweet
  
  
  #create dictionary
  dictt=json.loads(tweet)
  
  #print dictionary
  dictt.keys()
  
  #print values
  dictt.values()
  
  #loop through tweets
  for (key, value) in dictt.items():
      print key, '-&gt;', value
  
  #Created the DB
  import sqlite3
  conn = sqlite3.connect('twitter.db')
  c = conn.cursor()
  
  #Created the table for the tweets
  c.execute("CREATE TABLE Tweet(created_at, id, text, source,    in_reply_to_user_ID,retweet_Count)")
  </code></pre>
  
  <p>Here is my disconnect. Want to load those tweets (6 keys and values in the dict into the Tweet tables:</p>
  
  <pre><code>for elt in tweet:
      currentRow = elt[:-1].split(", ")
      insert = """insert into Tweet values ('%s', '%s', '%s', '%s', '%s', '%s')""" %("created_at", "id", "text", 'source', 'in_reply_to_user_ID', 'retweet_Count')
      print insert
  </code></pre>