g is easy to learn.
This line is added to the file.
</pre>
      <p>
        <strong>Explanation:</strong>
      </p>
      <ul>
        <li>We opened the file <code>example.txt</code> in <code>'a'</code> mode. This mode allows us to add content
          without touching the existing content.</li>
        <li>The <code>write()</code> method appends the new line at the end of the file.</li>
        <li><code>close()</code> is used to safely close the file after appending the text.</li>
      </ul>

      <h