I need to convert one into 1, two into 2 and so on.
one
1
two
2
Is there a way to do this with a library or a class or anythi
Here's the trivial case approach:
>>> number = {'one':1, ... 'two':2, ... 'three':3,} >>> >>> number['two'] 2
Or are you looking for something that can handle "twelve thousand, one hundred seventy-two"?