title: Dynamic array appending/exporting - Python
body: <p>Pretty new to Python and have been struggling to create something that would save and append the new values of my output function into an array for export. Got this so far, but this ain't elegant</p>
  
  <pre><code>merit=5 #example input
  MeritHist=[] #starting empty list
  MeritHist.append(merit)
  
  MeritArray=np.asarray(MeritHist) #turns into array
  np.savetxt('test.out', MeritArray, delimiter=',')   #exports array
  </code></pre>
  
  <p>After the first run I hash the MeritHist=[] line so that it doesn't restart my list and then on subsequent runs new values are added like I want, but it just doesn't feel right...</p>