LearnPy Hub
← File Handling problems
Easy

Is the Word in the File?

Write the first input line to doc.txt. Read the second line (a word) and print True if the word appears in the file's text.

Input

Two lines.

Output

True or False.

Sample 1

Input
I love Python
Python
Output
True

Sample 2

Input
I love Python
Java
Output
False
solution.py
Output appears here
Is the Word in the File? · Python practice problem · LearnPy Hub