title: Python MySQL insert behavior
body: <p>I believe I am having trouble with how MySQLdb handles null string inserts. For example, in my insert statement the last parameter in the values list may be the empty string. Here is what my values list looks like before I try to execute the query:</p>
  
  <pre><code>before:  ('FOUND', 'noise', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'noise NA NA NA NA NA NA NA NA NA', 'FOUND', '')
  
  Error: not all arguments converted during string formatting
  </code></pre>
  
  <p>I also tried replacing the empty string with <code>None</code> and <code>[None]</code> with no luck...</p>
  
  <p>Here is my code:</p>
  
  <pre><code>qry = "insert into golden_table (topic, week1, week2, week3, week4, week5, week6, week7, week10, week11, week12, clust_list, nGram, hash_tag) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')"
          try:
              for k in gt:
                  a = ((k[0],) + tuple(gt[(k[0], k[1], k[2])]))
                  b = tuple([str(reduce(lambda x,y: x+' '+y, gt[(k[0], k[1], k[2])]))])
                  if k[2] == '':
                      c = (k[1], '')
                  else:
                      c = (k[1], k[2])
                  print "before: ", (a+b+c)
                  qry = qry % (a+b+c)
                  print "after: ", qry
                  cur.execute(qry)
                  con.commit()
  </code></pre>
  
  <ol>
  <li>What is causing the conversion failure?</li>
  <li>How can I fix this?</li>
  </ol>
  
  <p>Thanks for all the help!</p>