Tuples from List
Paul Rubin
http
Tue Feb 27 19:59:41 EST 2007
rshepard at nospam.appl-ecosys.com writes:
> [ 6.24249034e-01+0.j 5.11335982e-01+0.j 3.67333773e-01+0.j
> 3.01189122e-01+0.j 2.43449050e-01+0.j 1.82948476e-01+0.j
> 1.43655139e-01+0.j 9.91225725e-02+0.j]
>
> and I want a list of floats of only the first 6 digits for each value. If I
> write:
> for i in listname:
> print i
If you mean the first six digits of the real part and they're all < 1,
for z in listname:
print '%.5f' % z.real
More information about the Python-list
mailing list