str.isnumeric(): True if 只包含数字;otherwise False。注意:此函数只能用于unicode string

str.isdigit(): True if 只包含数字;otherwise False。

str.isalpha():True if 只包含字母;otherwise False。

str.isalnum():True if 只包含字母或者数字;otherwise False。

posted on 2018-09-15 02:58  liuyihua1992  阅读(21011)  评论(0编辑  收藏  举报