>>> From fractions import Fraction
>>> f=Fraction(2/6)
>>> f
Fraction(6004799503160661, 18014398509481984)
it gives some unexpected result ? why
>>> From fractions import Fraction
>>> f=Fraction(2/6)
>>> f
Fraction(6004799503160661, 18014398509481984)
it gives some unexpected result ? why
you have to use ,
instead /
for fraction
from fractions import Fraction
f=Fraction(2,6)
print(f)