python判断字符串是否包含某子字符串
使用in方法:
testStr = 'helloworld'
if 'world' in testStr:
print ('Exist')
else:
print ('Not exist')
使用in方法:
testStr = 'helloworld'
if 'world' in testStr:
print ('Exist')
else:
print ('Not exist')