title: How to read a set of text files in to a single list in python
body: <p>I have a set of text files and i am trying to read it into a single list.but when i execute my code</p>
  
  <pre><code>def get_documents():
   path1 = "D:/set/"
   texts=[]
   listing1 = os.listdir(path1)
   for file in listing1:
      with open(path1+file,'r') as f:
          lines = f.read().splitlines()
      texts.append(lines)
   print texts
  </code></pre>
  
  <p>I am getting output as list of lists</p>
  
  <pre><code>[['Wanna see Riya Somani :) wish lyf olso moment lyk end half galfrnd... :) '], ['Worst book Mr. Chetan Bhagat.. Plz better stori ']]
  </code></pre>
  
  <p>How can i get it as a single list?</p>