title: Python SQL DB string literals and escaping
body: <p>Anyone know if the MySQLdb will automatically escape string literals for SQL statements?</p>
  
  <p>For instance I am trying to execute the following:</p>
  
  <pre><code>cursor.execute("""SELECT * FROM `accounts` WHERE `account_name` = 'Blah'""")
  </code></pre>
  
  <p>Will this escape the account name automatically? Or will it only escape if I do the following?:</p>
  
  <pre><code>x = 'Blah'
  cursor.execute("""SELECT * FROM `accounts` WHERE `account_name` = %s""", (x))
  </code></pre>
  
  <p>Or will it do it for both? Can anyone clarify this as I can't find any information on it.</p>