Contains a Word?
Completed
Read a sentence and a word. Print YES if the word appears in the sentence (case-insensitive), otherwise NO.
Input
Two lines.
Output
YES or NO.
Example
Input
I love Python python
Output
YES
Editor
Python
Hints
The in operator checks for a substring.
Lower-case both strings first.
Solution explanation
a in b is True when a is a substring of b. Normalising case first makes the check case-insensitive.
Show solution
sentence = input().lower()
word = input().lower()
print("YES" if word in sentence else "NO")