title: Convert python list object to an array
body: <p>How do i can convert python list to an array to include in mysql query? im using a mysql connector module, and got this error</p>
  <pre><code>Failed processing pyformat-parameters; Python 'tuple' cannot be converted to a MySQL type
  </code></pre>
  <p>im using this construction to get my values from url</p>
  <pre><code>from fastapi import FastAPI, Query
  from typing import List
  
  
  app = FastAPI()
  
  
  @app.get(&quot;/myurl&quot;)
  async def my_url(my_id: int = Query(...), my_type: List[int] = Query(None)):
  query_inc = (&quot;SELECT * from v_comments WHERE id=%(id)s and my_typeIN (%(my_type)s) ;&quot;)
  </code></pre>
  <p>i tried to make this <code>type=tuple(type)</code> but got error i\ve listed below
  if im not using tuple convert i got this <code>mysql.connector.errors.ProgrammingError: Failed processing pyformat-parameters; Python 'list' cannot be converted to a MySQL type</code></p>