Skip to content

Instantly share code, notes, and snippets.

@showyou
Created September 20, 2018 12:06
Show Gist options
  • Select an option

  • Save showyou/574bf2dbf039a3ab8b3319393d8695ef to your computer and use it in GitHub Desktop.

Select an option

Save showyou/574bf2dbf039a3ab8b3319393d8695ef to your computer and use it in GitHub Desktop.
isnumeric
In [10]: "恒河沙".isnumeric()
Out[10]: False
In [11]: "極".isnumeric()
Out[11]: False
In [12]: "載".isnumeric()
Out[12]: False
In [13]: "正".isnumeric()
Out[13]: False
In [14]: "澗".isnumeric()
Out[14]: False
In [15]: "溝".isnumeric()
Out[15]: False
In [16]: "穣".isnumeric()
Out[16]: False
In [17]: "𥝱".isnumeric()
Out[17]: False
In [18]: "兆".isnumeric()
Out[18]: True
In [19]: "1兆2千億".isnumeric()
Out[19]: True
In [20]: "一兆二千億".isnumeric()
Out[20]: True
In [21]: "-1".isnumeric()
Out[21]: False
In [22]: "1".isnumeric()
Out[22]: True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment