On 11/01/06, Mike Meyer <[EMAIL PROTECTED]> wrote:
Is it likely that x might not have any decimal places? If so all the above solutions fail when x =130 except Matt Hammond's offering which splits x at the decimal point if one exists.
"py" <[EMAIL PROTECTED]> writes:
> Say I have...
> x = "132.00"
> but I'd like to display it to be "132" ...dropping the trailing
> zeros...I currently try this
Is it likely that x might not have any decimal places? If so all the above solutions fail when x =130 except Matt Hammond's offering which splits x at the decimal point if one exists.
-- http://mail.python.org/mailman/listinfo/python-list