title: How to iterate through a list of file path names and delete each one?
body: <p>I have a script that creates a list of local files by path name that I would like to see deleted. The essence of my problem in the code below.  </p>
  
  <p>If it's easier just to move these files rather than delete them, that's an option. I've seen it might be an option to set the directory before I can get it do delete but I'm hoping for a more efficient function that will just read the paths and deal with them.  </p>
  
  <p>I don't need any function to discriminate between any file path names stored in the list. I want each file stored in the list, OUT.  </p>
  
  <p>The code as is now gives the error:</p>
  
  <pre class="lang-none prettyprint-override"><code>TypeError: remove: illegal type for path parameter
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>import os
  
  files = ['/users/computer/site/delete/photo1.jpg', '/users/computer/site/delete/photo3.jpg']
  
  os.remove(files)
  </code></pre>