Easy
with open()
Write the input line to
msg.txt using with, then print whether the file object is closed after the block and the file's contents.Input
One line.
Output
Two lines.
Sample 1
Input
hello
Output
True hello
Sample 2
Input
Python
Output
True Python
Output appears here