py wrote: > Say I have... > x = "132.00" > > but I'd like to display it to be "132" ...dropping the trailing > zeros...
print '%g' % (float(x),) might work. Mel. -- http://mail.python.org/mailman/listinfo/python-list
py wrote: > Say I have... > x = "132.00" > > but I'd like to display it to be "132" ...dropping the trailing > zeros...
print '%g' % (float(x),) might work. Mel. -- http://mail.python.org/mailman/listinfo/python-list