will be erased, and the new
          content will be written instead. So, be careful not to lose important data.</li>
      </ul>


      <h2>4. Appending to a File</h2>
      <p>
        If you want to add new data to the end of an existing file without removing the current content, you can use
        <code>'a'</code> mode. This is called <strong>appending</strong>.
      </p>

      <h3>Example 2: Append to a File</h3>
      <p>
        Now, let’s say we want to add some more content to <code>example.