In [1]:
import unicodedata
In [2]:
print(unicodedata.numeric('五'))
print(type(unicodedata.numeric('五')))
In [3]:
print(unicodedata.numeric('十'))
In [4]:
print(unicodedata.numeric('参'))
In [5]:
print(unicodedata.numeric('億'))
In [6]:
# print(unicodedata.numeric('五十'))
# TypeError: numeric() argument 1 must be a unicode character, not str
In [7]:
# print(unicodedata.numeric('漢'))
# ValueError: not a numeric character