title: WHERE IN Clause in python list
body: <p>I need to pass a batch of parameters to mysql in python. Here is my code:</p>
  
  <pre><code>sql = """ SELECT * from my_table WHERE name IN (%s) AND id=%(Id)s AND puid=%(Puid)s"""
  
  params = {'Id':id,'Puid'  : pid}
  in_p=', '.join(list(map(lambda x: '%s', names)))
  sql = sql %in_p
  
  cursor.execute(sql, names) #todo: add params to sql clause
  </code></pre>
  
  <p>The problem is I want to pass the name list to sql IN clause, meanwhile I also want to pass the id and puid as parameters to the sql query clause. How do I implement these in python?</p>