title: Python fastest way to read a large number of small files into memory?
body: <p>I'm trying to read a few thousands html files stored on disk.</p>
  
  <p>Is there any way to do better than;</p>
  
  <pre><code>for files in os.listdir('.'):
      if files.endswith('.html') :
          with (open) files as f:
              a=f.read()
              #do more stuffs
  </code></pre>