##包含写法 = "This be a string" |
if s.find( "is" ) = = - 1 : |
print "No 'is' here!" |
else : |
print "Found 'is' in the string." ##也可以用append函数把内容加载到数组中去 |
##非包含写法 = "This be a string" |
if s.find( "is" ) = = - 1 : |
print "No 'is' here!" ##也可以用append函数把不包含内容加载到数组中去 |
else : |
print "Found 'is' in the string." |