5 lines
141 B
Python
5 lines
141 B
Python
|
import fractions
|
||
|
|
||
|
for s in ['0.7', '2.5', '9.32', '7e-1']:
|
||
|
f = fractions.Fraction(s)
|
||
|
print('{0:>4} = {1}'.format(s, f))
|