title: How can I get the file names and contents of a whole directory?
body: <p>I have a directory named <code>main</code> that contains two files: a text file named <code>alex.txt</code> that only has <code>100</code> as its contents, and another file named <code>mark.txt</code> that has <code>400</code>.</p>
  
  <p>I want to create a function that will go into the directory, and take every file name and that file's contents and store them (into a dict?). So the end result would look something like this:</p>
  
  <pre><code>({'alex.txt', '100'}, {'mark.txt', '400'})
  </code></pre>
  
  <p>What would be the best way of doing this for large amounts of files?</p>