how to separate decimal value in python and returns fraction code example
Example: how to cnovert a decimal to fraction python
>>> from fractions import Fraction
>>> Fraction(0.25)
Fraction(1, 4)
>>> from fractions import Fraction
>>> Fraction(0.25)
Fraction(1, 4)