py wrote: > x = "132.15" ...i dont want to modify it. But if > x = "132.60" ...I want it to become "132.6" > > is there a better way to do this? It seems a bit ugly to me.
The following works as long as you don't mind losing leading zeros
as well:
x = x.strip('0')
Gary Duzan
Motorola CHS
--
http://mail.python.org/mailman/listinfo/python-list
