title: Python: Inserting row into database with formatting
body: <p>I'm trying to insert a row into a table that I've set up in a database. </p>
  
  <p>My Code:</p>
  
  <pre><code>cursor.execute("""INSERT INTO scan (prefix, code_id, answer, station) VALUES(%s, %s, %s, %s, timestamp, comport)""",[(prefix, code_id, answer, station)])
  </code></pre>
  
  <p>I'm getting for an error that is saying that it doesn't like what is in "[]".</p>
  
  <p>I don't completely understand how "%s" works. I've tried many examples and all have failed me. </p>
  
  <p>I got this example from <a href="http://mysql-python.sourceforge.net/MySQLdb.html" rel="nofollow">http://mysql-python.sourceforge.net/MySQLdb.html</a></p>