python 判断字符串中是否包含数字

code

bool(re.search(r'\d', str))

 

posted @ 2020-05-12 19:19  anobscureretreat  阅读(13526)  评论(0)    收藏  举报