A
Q. What is the output of the following program?
Code:
f = None
for i in range (5):
with open("data.txt", "w") as f:
if i > 2:
break
print(f.closed)
for i in range (5):
with open("data.txt", "w") as f:
if i > 2:
break
print(f.closed)
- Correct Answer - Option(A)
- Views: 31
- Filed under category Python
- Hashtags:
Discusssion
Login to discuss.