title: How to traverse through the files in a directory?
body: <p>I have a directory logfiles. I want to process each file inside this directory using a Python script.</p>
  
  <pre><code>for file in directory:
        # do something
  </code></pre>
  
  <p>How do I do this?  </p>