title: mysql-connector python 'IN' operator stored as list
body: <p>I am using mysql-connector with python and have a query like this:</p>
  
  <pre><code>SELECT avg(downloadtime) FROM tb_npp where date(date) between %s and %s and host like %s",(s_date,e_date,"%" + dc + "%")
  </code></pre>
  
  <p>NOw, if my variable 'dc' is a list like this:</p>
  
  <pre><code> dc = ['sjc','iad','las']
  </code></pre>
  
  <p>Then I have a mysql query like below:</p>
  
  <pre><code>SELECT avg(downloadtime) FROM tb_npp where date(date) = '2013-07-01' and substring(host,6,3) in ('sjc','las');
  </code></pre>
  
  <p>My question is, how do I write this query in my python code which will convert my variable 'dc' to a list? </p>
  
  <p>I tried the below query but getting error: Failed processing format-parameters; 'MySQLConverter' object has no attribute '_list_to_mysql'</p>
  
  <pre><code>cursor3.execute("SELECT avg(downloadtime) FROM tb_npp where date(date) between %s and %s and substring(host,6,3) in %s",(s_date,e_date,dc))
  </code></pre>
  
  <p>Can somebody please tell me what I am doing wrong?</p>
  
  <p>Thanks in advance</p>