adplus-dvertising
frame-decoration

Question

What is the output?
f = None
for i in range (5):
    with open("data.txt", "w") as f:
        if i > 2:
            break
print(f.closed)

a.

True

b.

False

c.

None

d.

Error

Answer: (a).True

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output?