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

python怎么实现判断输入的字符串是否同时包含大小写字母和数字

使用正则表达式匹配

#是否包含数字
import re
bool(re.search(r'\d', str))