The ‘closed’ attribute of a file object indicates whether th…
The ‘closed’ attribute of a file object indicates whether the file is open or not. If the file is closed, ‘closed’ attribute returns True. What would be the outcome of the following code? with open(‘input.txt’, ‘r’) as fp: fp.read() print(fp.closed)