title: python: cannot concatenate 'str' and 'tuple' objects
body: <p>I want to get pool number from employee table and use the pool number as parameter for query 1.i get error  python: cannot concatenate 'str' and 'tuple' objects.</p>
  
  <pre><code>import MySQLdb
  import sys
  
  factor_mm=sys.argv[1]
  factor_yy=sys.argv[2]
  
  con_pd1 = MySQLdb.connect('localhost', 'abc', '12345', 'test')
  
  cursor_pd1=con_pd1.cursor()
  
  query="select pool_number from employee where current_mm="+factor_mm+" and current_yy="+factor_yy+" ;"
  cursor_pd1.execute(query)
  pools=cursor_pd1.fetchall()
  pool_list=[]
  for pool in pools:
   pool_list.append(pool[0])
  
  for pool in pool_list:
   pool_number=pool
   try:
      query1="select * from fnma_mbs where pool_number='"+pool_number+"' and current_mm="+factor_mm+" and current_yy="+factor_yy+" ;"
      cursor_pd1.execute(query1)
      cursor_seqdb1.execute(query1)
  
      numrows_pd1=cursor_pd1.rowcount
      numrows_seqdb1=cursor_seqdb1.rowcount
  </code></pre>