title: Python formatting: How to insert blank spaces in between array data elements of data type float
body: <p>I have a question regarding formatting. I am trying to extract relevant data and insert this data into a fortran file. Thankfully, I am using python to accomplish this task. It just so happens that the fortran file is sensitive to the number of spaces between text. So, this brings me to my question. My array array data looks like:</p>
  
  <pre><code>    [[ -1.80251269  12.14048223  15.47522331]
       [ -2.63865822  13.1656285   15.97462801]
       [ -1.76966256  11.35311123  16.13958474]
       [ -0.76320052  12.45171386  15.34209158]
       [ -2.12634889  11.84315415  14.48020468]]
      [[-14.80251269   1.14048223   1.47522331]
       [ -2.63865822  13.1656285   15.97462801]
       [ -1.76966256  11.35311123  16.13958474]
       [ -0.76320052  12.45171386  15.34209158]
       [ -2.12634889  11.84315415  14.48020468]]
      [[ -0.80251269   0.14048223   0.47522331]
       [ -2.63865822  13.1656285   15.97462801]
       [ -1.76966256  11.35311123  16.13958474]
       [ -0.76320052  12.45171386  15.34209158]
       [ -2.12634889  11.84315415  14.48020468]]
  </code></pre>
  
  <p>These elements are floats, not strings. For example, I wanted the the first row (and every row thereafter) of the data to look like:</p>
  
  <pre><code>     -1.80251269     12.14048223     15.47522331
  </code></pre>
  
  <p>How would I accomplish this? To be specific, there are 5 white spaces that seperate the left margin from the 1st number, -1.80251269, and 5 white spaces that seperate each of the three numbers. Notice also that I need the array brackets gone, but I suspect I can do this with a trim function. Sorry for my lack of knowledge guys; I do not even know how to begin this problem as my knowledge in Python syntax is limited. Any help or tips would be appreciated. Thanks!</p>
  
  <p>EDIT: this is the code I am using to generate the array:</p>
  
  <pre><code>     fo = np.genfromtxt("multlines.inp")
       data=scipy.delete(fo, 0, 1)
       txt = np.hsplit(data,3)
       all_data = np.vsplit(data, 4)
       i=0
       num_molecules = int(raw_input("Enter the number of molecules: "))
       print "List of unaltered coordinates:"
       while i &lt; (num_molecules):
            print all_data[i]
  </code></pre>