L
les ander
Hi,
suppose I have a list
d=[1.2 , 31.1, 1.001]
in general i will not know the size of d
however, I would like to print them out nicely in the row format
such as:
print "%-10f "* len(d) % d
however, the above line does not work--python says that float
argument is required.
So i did
print "%-10s "* len(d) % map(str,d)
But now I get:
TypeError: not enough arguments for format string
please help
thanks
suppose I have a list
d=[1.2 , 31.1, 1.001]
in general i will not know the size of d
however, I would like to print them out nicely in the row format
such as:
print "%-10f "* len(d) % d
however, the above line does not work--python says that float
argument is required.
So i did
print "%-10s "* len(d) % map(str,d)
But now I get:
TypeError: not enough arguments for format string
please help
thanks