title: Use IN clause in python django and cursor execute
body: <p>I have a list named "<code>critical_severity_list</code>" as below:<code>[30, 40]</code></p>
  
  <p>I want to execute a select with IN clause as below:</p>
  
  <pre><code>cursor = connection.cursor()
  
  que = 'select * from tm_txn_age_severity_config where txn_state_id = %s and txn_type_id = %s and txn_age_severity_id in ( %s)'
  
  in_ids = ', '.join(map(lambda x: '%s', critical_severity_list))
  
  que = que % ('%s', in_ids)
  
  bind_var_list = [] 
  
  bind_var_list.append(rec[1])
  
  bind_var_list.append(rec[2])
  
  bind_var_list.extend(critical_severity_list)
  
  cursor.execute(que, bind_var_list)
  
  result = cursor.fetchall()
  </code></pre>
  
  <p>I am getting this error:
  not enough arguments for format string</p>
  
  <p>Can someone help me with the solution....??</p>