nt = file.read()  # Read the entire content of the file
print(content)  # Display the content on the screen
file.close()  # Close the file after use
  </pre>
      </div>
      <h3>Output:</h3>
      <p>If <code>example.txt</code> contains:</p>
      <pre>
Hello, this is a sample file.
Welcome to Python file handling!
</pre>
      <p>The program will display:</p>
      <pre>
Hello, this is a sample file.
Welcome to Python file handling!
</pre>

      <h3>Step-by-Step Explanation:</h3>
      <ol>
        <li