altering the print statement and getting rid of long decimal points
<p>I have a print statement in my code which generates the following list. The line is,</p>

<pre><code>grp = itertools.groupby(phonemeList, lambda i: i[1] is None)
phList = [tuple(i[1]) for i in grp if not i[0]] 

print "\nsyllable groups separated"
print '\n\n'.join(str(l) for l in phList)
</code></pre>

<p>The output is,</p>

<pre><code>syllable groups separated
(('pau', [(0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), [0.0, 0.0],  [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('s', [(0.0, 0.5), [0.10000000000000001, 1.0], (0.0, 1.0), [0.0, 0.0], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('aa', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 1.0], (0.0, 0.5), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('m', [[0.0, 0.0], [0.0, 0.0], (0.0, 1.0), [0.0, 0.80000000000000004], (0.0, 1.0), [1.0, 1.0], [0.5, 0.5], [1.0, 1.0], [1.0, 1.0]]), ('ih', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], [0.10000000000000001, 0.5], [0.0, 0.80000000000000004], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('k', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 0.80000000000000004], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('l', [(0.0, 0.69999999999999996), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 0.40000000000000002], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('eh', [(0.0, 0.40000000000000002), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 1.0], (0.0, 0.5), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('k', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 0.80000000000000004], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('t', [[0.0, 0.0], [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 0.40000000000000002], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('aa', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 1.0], (0.0, 0.5), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('n', [(0.0, 0.40000000000000002), [0.10000000000000001, 1.0], (0.0, 1.0), [0.0, 0.0], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('ih', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], [0.10000000000000001, 0.5], [0.0, 0.80000000000000004], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('t', [[0.0, 0.0], [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 0.40000000000000002], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('pau', [(0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('g', [(0.0, 0.5), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 0.80000000000000004], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('eh', [(0.0, 0.40000000000000002), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 1.0], (0.0, 0.5), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('l', [(0.0, 0.69999999999999996), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 0.40000000000000002], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('v', [[0.29999999999999999, 1.0], [0.0, 0.0], (0.0, 1.0), (0.10000000000000001, 1.0), (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('ae', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], [0.10000000000000001, 0.80000000000000004], [0.0, 1.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('n', [(0.0, 0.40000000000000002), [0.10000000000000001, 1.0], (0.0, 1.0), [0.0, 0.0], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('ih', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], [0.10000000000000001, 0.5], [0.0, 0.80000000000000004], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('k', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 0.80000000000000004], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('pau', [(0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('aa', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 1.0], (0.0, 0.5), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]),)

(('p', [[0.0, 0.0], [0.0, 0.0], (0.0, 1.0), [0.0, 0.80000000000000004], (0.0, 1.0), [1.0, 1.0], [0.5, 0.5], [1.0, 1.0], [1.0, 1.0]]), ('l', [(0.0, 0.69999999999999996), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 0.40000000000000002], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('ao', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 1.0], (0.0, 0.5), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('iy', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], [0.10000000000000001, 1.0], [0.0, 0.80000000000000004], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('k', [(0.0, 0.29999999999999999), [0.10000000000000001, 0.80000000000000004], (0.0, 1.0), [0.0, 0.80000000000000004], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), ('pau', [(0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))
</code></pre>

<p>Here the groups are separated with an outer round brackets(). But even inside the groups there are more than one alphabets. How do I get them each in a new line? I would also like to get rid of all these decimal places. The output should display only upto 1 decimal point. Though the input has only 1 decimal point but python just displays long decimal points in the output. The output should look like this, </p>

<pre><code>syllable groups separated
(('pau', [(0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('s', [(0.0, 0.5), [0.1, 1.0], (0.0, 1.0), [0.0, 0.0], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('aa', [(0.0, 0.3), [0.1, 0.8], (0.0, 1.0), [0.0, 1.0], (0.0, 0.5), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('m', [[0.0, 0.0], [0.0, 0.0], (0.0, 1.0), [0.0, 0.8], (0.0, 1.0), [1.0, 1.0], [0.5, 0.5], [1.0, 1.0], [1.0, 1.0]]), 
 ('ih', [(0.0, 0.3), [0.1, 0.8], [0.1, 0.5], [0.0, 0.8], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('k', [(0.0, 0.3), [0.1, 0.8], (0.0, 1.0), [0.0, 0.8], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('l', [(0.0, 0.7), [0.1, 0.8], (0.0, 1.0), [0.0, 0.4], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('eh', [(0.0, 0.4), [0.1, 0.8], (0.0, 1.0), [0.0, 1.0], (0.0, 0.5), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('k', [(0.0, 0.3), [0.1, 0.8], (0.0, 1.0), [0.0, 0.8], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('t', [[0.0, 0.0], [0.1, 0.8], (0.0, 1.0), [0.0, 0.4], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('aa', [(0.0, 0.3), [0.1, 0.8], (0.0, 1.0), [0.0, 1.0], (0.0, 0.5), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('n', [(0.0, 0.4), [0.1, 1.0], (0.0, 1.0), [0.0, 0.0], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('ih', [(0.0, 0.3), [0.1, 0.8], [0.1, 0.5], [0.0, 0.8], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('t', [[0.0, 0.0], [0.1, 0.8], (0.0, 1.0), [0.0, 0.4], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('pau', [(0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('g', [(0.0, 0.5), [0.1, 0.8], (0.0, 1.0), [0.0, 0.8], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('eh', [(0.0, 0.4), [0.1, 0.8], (0.0, 1.0), [0.0, 1.0], (0.0, 0.5), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('l', [(0.0, 0.7), [0.1, 0.8], (0.0, 1.0), [0.0, 0.4], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('v', [[0.3, 1.0], [0.0, 0.0], (0.0, 1.0), (0.1, 1.0), (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('ae', [(0.0, 0.3), [0.1, 0.8], [0.1, 0.8], [0.0, 1.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('n', [(0.0, 0.4), [0.1, 1.0], (0.0, 1.0), [0.0, 0.0], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('ih', [(0.0, 0.3), [0.1, 0.8], [0.1, 0.5], [0.0, 0.8], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('k', [(0.0, 0.3), [0.1, 0.8], (0.0, 1.0), [0.0, 0.8], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('pau', [(0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))

(('aa', [(0.0, 0.3), [0.1, 0.8], (0.0, 1.0), [0.0, 1.0], (0.0, 0.5), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]),)

(('p', [[0.0, 0.0], [0.0, 0.0], (0.0, 1.0), [0.0, 0.8], (0.0, 1.0), [1.0, 1.0], [0.5, 0.5], [1.0, 1.0], [1.0, 1.0]]), 
 ('l', [(0.0, 0.7), [0.1, 0.8], (0.0, 1.0), [0.0, 0.4], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('ao', [(0.0, 0.3), [0.1, 0.8], (0.0, 1.0), [0.0, 1.0], (0.0, 0.5), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('iy', [(0.0, 0.3), [0.1, 0.8], [0.1, 1.0], [0.0, 0.8], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('k', [(0.0, 0.3), [0.1, 0.8], (0.0, 1.0), [0.0, 0.8], (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]), 
 ('pau', [(0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]))
</code></pre>
