title: Merge different lists together in Python
body: <p>I am so called newbie in Python.
  I have difficulties with lists.
  I have a loop which take some info from textfile and goes through function. If textfiles lenght is 10 rows then output will be 10 separate lists, like that:
  [0.45]
  [0.87] 
  ...
  and so on, for n+1 times(it depends how long textfile is).</p>
  
  <p>How can I put them into single list, like [0.45, 0.87, ...]?
  I experimented with different loops but nothing :(</p>
  
  <p>I am previously thankfull :)
  .. and sry about my bad english</p>
  
  <p>Code:</p>
  
  <pre><code>from pyfann import libfann
  import os
  path="."
  ext = ".net"
  files = [file for file in os.listdir(path) if file.lower().endswith(ext)]
  for j in files:
   ann = libfann.neural_net()
   ann.create_from_file(j)
   print j
   f=open('nsltest1.dat','r')
   for i in f:
    x=i.strip()
    y=[float(i) for i in x.split()]
    z=ann.run(y)
    print z    
  </code></pre>