Python output replace not float value
<pre><code>a = raw_input()
a = a.split(',')
def printFormat(file):
    for i in range(len(a)-1):
        if a[i] != '':
            a[i] = float(a[i])
print '%05.1f %05.2f %5d %5d %5d %05.1f %05.1f %5d %5d %05.2f %05.2f %16s'%(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11])
printFormat(a)
</code></pre>

<p>This is my code here.I want to print some values in a good format, but here is the problem.If all the value is float, the code works fine.When one of it is space or something else,there will  be an error.I want to replace all none float value to '-' and still in a good format.
Here is the example input:</p>

<pre><code>1.3,,15,18,5,4.1,1.4,98,1,6.53,2.39,9/9/2016 10:00
</code></pre>

<p>The output should be:</p>

<pre><code>001.3   -   15    18     5 004.1 001.4    98     1 06.53 02.39   9/9/2016 10:00
</code></pre>

<p>Don't know how to replace the none float value with '-' in the middle of the space.</p>