title: read a file and download the links in that file use urllib.request in python 3
body: <p>I want to use urllib.request download a list links, and the links are in a file. For example, I have a file like this:</p>
  
  <pre><code>http://www.xxxxx.com/1.jpg
  http://www.xxxxx.com/2.png
  http://www.xxxxx.com/3.tar
  http://www.xxxxx.com/4.zip
  </code></pre>
  
  <p>and many many more...</p>
  
  <p><br>
  However, now I want to download them use urllib.request in python 3. I know how to read and download them:</p>
  
  <pre><code>with open('file', 'r') as f:
      for i in f.readlines()
          file = urllib.request.urlopen(i)
  </code></pre>
  
  <p>and then, I think I need open a file like <code>with open('file', 'wb') as f:</code>, but I don't know which file name should I use. Should I make a list and write some code like this: <code>with open(file_name_list, 'wb') as f:</code>?</p>