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

code

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

 

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