title: Fastest way to download a set of files in Python
body: <p>The title is pretty self-explanatory.</p>
  <p>So far I have tried using threads, multiprocessing, etc.</p>
  <p>Below is my current code but I would like to know the absolute, fastest way possible.</p>
  <pre class="lang-py prettyprint-override"><code>import requests
  import threading
  
  def download(url):
  
    r = requests.get(url)
  
    with open(url, &quot;wb&quot;) as f:
      f.write(r.content)
  
  urls = [
    &quot;https://google.com/favicon.ico&quot;,
    ...
  ]
  
  for url in urls:
  
    threading.Thread(target = download, args = [url]).start()
  </code></pre>