Remove integer from float number

Arne Ludwig arne at citde.net
Thu Mar 23 16:49:48 EST 2006


With that terse description and the subject line I would interpret the
OP like so:

>>> print re.sub(".*\.",".","0.666")
.666
>>> print re.sub(".*\.",".","123.666")
.666




More information about the Python-list mailing list