$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #195

Fill the blank

# reuse the file handle safely
____ open(path) as f:
    data = f.read()

Answer: with (also accepted: with, with())

A with block closes the file even if the body raises.
Play Problem Solving ▸