像pythonisp一样的普通单词怎么做:
[3]> (format t "~r" 1e25)
nine septillion, nine hundred and ninety-nine sextillion, nine hundred and ninety-nine quintillion, seven hundred and seventy-eight quadrillion, one hundred and ninety-six trillion, three hundred and eight billion, three hundred and sixty-one million, two hundred and sixteen thousand
以下是一种方法:
它的作用是:
^{pr2}$我刚开始用土耳其语工作,可能会有帮助。在
https://github.com/guneysus/humanizer-tr
它返回一个字符串列表,并附带简单的测试函数}
randomizer()
prettizer()
和核心函数{它可以处理非常大的数字,因为它没有使用除法,而是使用字符串分割和操作。在
您可以输入偶数或字符串。在
因为我没有写数字验证,它甚至可以处理非数字文本 :)
python内核中没有,但有第三方库num2words
(请注意,1e25并没有精确地转换为整数,在您的示例中也是如此)
相关问题 更多 >
编程相关推荐