Python Tutorial by Siva Krishna
Monday, 27 November 2017
converting word to number in python
pip install word2number
from word2number import w2n
print(w2n.word_to_num('ten'))
10
print(w2n.word_to_num('one hundred twenty three'))
123
print(w2n.word_to_num('one thousand two hundred twenty three'))
1223
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment