title: Using multithreading for api requests in python
body: <p>For my project I need to request a api and to store the result in a list. But the no. of requests I need to give more than 5000 with different body values. So, it take huge amount of time to complete. Is there is any way to parallely send the requests to complete the process quickly. I tried some threading code in this but I can't be able to figure out the ay to solve this.</p>
  <pre><code>import requests
  res_list=[]
  l=[19821, 29674 , 41983, 40234 ,.....] # Nearly 5000 items for now  and the count may increase in future
  for i in l:
      URL =&quot;https://api.something.com/?key=xxx-xxx-xxx&amp;job_id={0}&quot;.format(i)
      res = requests.get(url=URL)
      res_list.append(res.text)
  </code></pre>