编辑器
from fractions import Fraction a = Fraction(1, 3) b = Fraction(1, 6) c = a + b print(c) print(float(c))
1/2
0.5