title: How to load multiple text files from a folder into a python list variable
body: <p>I have a folder full of text documents, the text of which needs to be loaded into a single list variable.</p>
  <p>Each index of the list, should be the full text of each document.</p>
  <p>So far I have this code, but it is not working as well.</p>
  <pre><code>dir = os.path.join(current_working_directory, 'FolderName')
  file_list = glob.glob(dir + '/*.txt')
  corpus = [] #--&gt;my list variable
  for file_path in file_list:
      text_file = open(file_path, 'r')
      corpus.append(text_file.readlines()) 
      text_file.close()
  </code></pre>
  <p>Is there a better way to do this?</p>
  <p><strong>Edit:</strong> Replaced the csv reading function (<code>read_csv</code>) with text reading function (<code>readlines()</code>).</p>