python 2.7 - Check whether a string contains a specific word -
sorry if duplicate, looked around , couldn't find needs. complete beginner python, , wondering if there way analyze string words using built in modules. appreciated. thanks.
here function returns true if can find word in string, , false if can't.
def iswordin(word, string): return not(string.find(word) == -1)
Comments
Post a Comment