title: Is there any way to replace for loop to Multiple-threading for speedy time execution?
body: <p>For a detailed understanding, I have attached a link of file.</p>
  <p><a href="https://colab.research.google.com/drive/1_qHGRkoW68uJ__IRRxtZwUCOMI_ollc_?usp=sharing" rel="nofollow noreferrer">Indetail understanding code</a></p>
  <p>I have data in the list, that has similar syntax like:</p>
  <pre><code>i = [a.b&gt;c.d , e.f.g&gt;h.i.j ]
  l = [a.b , e.f.g ]
  n = [a.b&gt;c.d , e.f.g ]
  </code></pre>
  <p>e.g. Each element of the list has multiple sub-elements separated by &quot;.&quot; and &quot;&gt;&quot;</p>
  <pre><code>for i in range(0, len(l)):
  reac={}
  reag={}
  t = l[i].split(&quot;&gt;&quot;)
  REAC = t[0]
  Reac = REAC.split(&quot;.&quot;)
  
  for o in range(len(Reac)):
  
      reaco = &quot;https://ai.chemistryinthecloud.com/smilies/&quot; + Reac[o]
  
      respo = requests.get(reaco)
      reac[o] ={&quot;Smile&quot;:Reac[o],&quot;Details&quot; :respo.json()}
  
  if (len(t) != 1):
      REAG = t[1]
      Reag = REAG.split(&quot;.&quot;)
      for k in range(len(Reag)):
  
          reagk = &quot;https://ai.chemistryinthecloud.com/smilies/&quot; + Reag[k]
          repo = requests.get(reagk)
          reag[k] = {&quot;Smile&quot;: Reag[k], &quot;Details&quot; :repo.json()}
      res = {&quot;Reactants&quot;: list(reac.values()), &quot;Reagents&quot;: list(reag.values())}
      boo.append(res)
  else:
      res = {&quot;Reactants&quot;: list(reac.values()), &quot;Reagents&quot;: &quot;No reagents&quot;}
      boo.append(res)
  </code></pre>
  <p>We have separated all the elements and for each element, we are calling 3rd party API. That consumes too much time.</p>
  <p>Is there any way to reduce this time and optimize for the loop?</p>
  <p>It takes around 1 minute to respond. We want to optimize to 5-10 seconds.</p>