python check if word is at the and of the string code example Example: how to check if a string contains a word python if word in mystring: print('success')