s the text provided to the file. In this case, we wrote two lines.</li>
        <li><code>close()</code> ensures the file is properly closed after writing, which is important to save the
          changes and free up system resources.</li>
      </ul>

      <h3>Important Points about Writing:</h3>
      <ul>
        <li>If the file <code>example.txt</code> doesn’t exist, Python will create it automatically.</li>
        <li>If you open a file in <code>'w'</code> mode and the file already has content, it 