LearnPy Hub
← Context Managers problems
Easy

Closed Automatically

Write the input to t.txt using with open(...) as f. Print f.closed inside the block and again after it, then print the file's contents.

Input

One line.

Output

Three lines.

Sample 1

Input
hello
Output
False
True
hello

Sample 2

Input
x
Output
False
True
x
solution.py
Output appears here
Closed Automatically · Python practice problem · LearnPy Hub