Input: query = “catering”
word = “cat”
Output: def check_contains(query, word):
if query.find(word) != -1:
return True
return False
result = check_contains(query, word)
Prompt: Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Implement a Python function that will take two strings and return true if the first string contains the second.
### Input:
query = “catering”
word = “cat”
### Output:
def check_contains(query, word):
if query.find(word) != -1:
return True
return False
result = check_contains(query, word)