i wrote as–>
with open(“sample.txt”,“r”) as f:
print(f.closed())
print(f.read())
it is giving TypeError Traceback (most recent call last)
in
1 with open(“file.txt”,“r”) as f:
----> 2 print(f.closed())
3 print(f.read())
TypeError: ‘bool’ object is not callable