Decimals to fraction strings

Scott kain at cableadmin.com
Mon May 15 22:32:51 EDT 2000


Hi,

Does anyone know of a way to convert decimal numbers to a string 
representation of the fractional value? For example:
0.5 = "1/2"
or
1.125 = "1 1/8"

Thanks,
Scott




More information about the Python-list mailing list