Closed techn0man1ac closed 2 weeks ago
"30.0".isdigit()
returns False.
You can try comething like this:
text = ' '.join([num2words.num2words(i, to='cardinal', lang='uk') if i.replace('.','',1).isdigit() else i for i in text.split()])
The result is: Правило Парето, це завжди сімдесят % на тридцять % - тридцять кома нуль нуль % це робота а сімдесят кома нуль нуль % - результат
"30.0".isdigit()
returns False. You can try comething like this:text = ' '.join([num2words.num2words(i, to='cardinal', lang='uk') if i.replace('.','',1).isdigit() else i for i in text.split()])
The result is: Правило Парето, це завжди сімдесят % на тридцять % - тридцять кома нуль нуль % це робота а сімдесят кома нуль нуль % - результат
Awesome. Thank's.
Hello.
I have are problem - here simple example:
As you can see, everything works perfectly with integers, but misses floating point numbers.