1: Write to a File</h3>
      <p>
        Let’s say we want to create a file or overwrite an existing file, and then write some new content into it.
        Here’s how you do it:
      </p>
      <div class="code-block">
        <pre>
# Example: Write new data to a file
file = open("example.txt", "w")  # 'w' mode opens the file for writing (it overwrites the file if it exists)
file.write("Hello, Python learners!\n")  # Write a line of text
file.write("File handling is easy to learn.")  # Write another l