This problem occurs when writing files in Python:

The indent of f.close() is the same as that of for