Live Engine
Select Topic
easyFile Management
A teammate says "you don't need with when opening files — just call close() at the end." What scenario proves them wrong?
Code
# Teammate's approach
f = open("data.txt")
data = f.read()
process(data) # raises RuntimeError
f.close() # never reached