title: Python : using a loop, read and save data to different lists
body: <p>I want to create a loop which reads  data from multiple  .txt files and save it to different lists (according to these different .txt files).</p>
  
  <p>I don't know how to create the following lists (or np.arrays) in a loop: time1, time2, .. timeN, where N is a number of .txt files to analyze. 
  I used the following to connect the 'constant' time and the 'variable' number: obj['time'+str(shot)], but it is not saved as a variable.</p>
  
  <pre class="lang-py prettyprint-override"><code>import numpy as np
  import os
  
  for shot in  range(1,10):   
      #get the first txt:
      txt_file = os.path.join(path,'shot'+str(shot)+'.txt')
      #get data from txt:      
      data = np.genfromtxt(txt_file, skip_header = 4) 
      # now save it to the list (or np.array):
      obj['time'+str(shot)] = np.array([row[0] for row in data])    
  </code></pre>
  
  <p>As an output I want to have 10 lists or arrays with time to work with them in future.</p>