 file = open("missing_file.txt", "r")  # This file doesn't exist
    print(file.read())
    file.close()
except FileNotFoundError:
    print("The file does not exist. Please check the filename.")
    </pre>
      </div>
      <p>
        <strong>Explanation:</strong> The <code>try</code> block attempts to open a file. If the file is not found, the
        <code>except</code> block runs, displaying an error message.
      </p>

      <h2>6. Closing a File</h2>
      <p>
        Always close a file after usin