阅读背景:

有没有办法在Python中获得分数的重复小数部分?

来源:互联网 

I'm working with fractions using Python's decimal module and I'd like to get just the repeating part of a certain fraction. For example: if I had 1/3 I'd like to get 3, if I had 1/7 I'd like to get 142857. Is there any standard function to do this?I'm working with fractions using Python's decim




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: