Source Code:
(back to article)
sentence = "The quick brown fox jumps over the lazy dog." if "cat" in sentence: print("The string contains the substring 'cat'.") else: print("The string does not contain the substring 'cat'.")
Result:
Report an issue