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

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

s = '1234问沃尔沃434'
if s.find('沃尔沃') != -1:
    print('存在')
else:
    print('不存在')

猜你喜欢

转载自www.cnblogs.com/WebLinuxStudy/p/11430390.html