Answers for "format float to fractions in python"

3

python float to fraction

>>> from fractions import Fraction
>>> Fraction(0.25)
Fraction(1, 4)
Posted by: Guest on April-30-2021

Python Answers by Framework

Browse Popular Code Answers by Language