title: Incorporating preset values in ascii file writing Python
body: <p>I am trying to incorporate preset values in my script for when I write to an ascii file, however I have not been able to find out how to do this. My preset values are string values pulled from a different file before.</p>
  
  <pre><code>XBenchmark = (find_line_and_column('zz_ssmv11034tS__T0001TTNATS2012021505HP001.Hdr', 49, 4))
  
  YBenchmark = (find_line_and_column('zz_ssmv11034tS__T0001TTNATS2012021505HP001.Hdr', 50, 4))
  
  Xaxis= (find_line_and_column('zz_ssmv11034tS__T0001TTNATS2012021505HP001.Hdr', 51, 3))
  
  Yaxis = (find_line_and_column('zz_ssmv11034tS__T0001TTNATS2012021505HP001.Hdr', 52, 3))
  </code></pre>
  
  <p>I am trying to incorporate those preset values somehow in a file write similar to this.</p>
  
  <pre><code>f = open('zz_ssmv11034tS__T0001TTNATS2012021505HP001.Hdr','w')
  f.writelines(['byteorder M\n', 'layout bil\n', 'nbands 1\n', 'nbits 16\n', 'ncols 6935\n''nrows (**Yaxis**)\n''ulxmap (**Xbenchmark**)\n''ulymap 52.8704166666666\n'])
  f.close()
  </code></pre>