write formated file
<p>I want to to write <code>np.double</code> to formated file:</p>

<pre><code>import numpy as np
a='12 45 87 34 65';
s=np.double(a.split())
fid=open('qqq.txt','wt')
fid.write('%5.1f %5.1f %5.1f %5.1f %5.1f ' %(s[0],s[1],s[2],s[3],s[4]))
fid.close()
</code></pre>

<p>Can this "write" row be written in a shorter way?</p>

<pre><code>fid.write('%5.1f %5.1f %5.1f %5.1f %5.1f ' %(s[0],s[1],s[2],s[3],s[4]))
</code></pre>
