Victor Subervi wrote:
Hi; I have the following code:
[snip]
price = str(int(stuff[5]*100)) price = price[0:len(price)-2] + '.' + price[-2:]
[snip] This is simpler: price = "%.2f" % stuff[5] (not that I like what you're doing with it; leaving it as a float and just formatting to 2 decimal places when printing it would be better! :-)) -- http://mail.python.org/mailman/listinfo/python-list