re>
<span class="code-comment"># Install required packages</span>
<span class="code-comment"># pip install requests beautifulsoup4</span>

import requests
from bs4 import BeautifulSoup

<span class="code-comment"># Fetch a web page</span>
url = "https://example.com"
response = requests.get(url)

<span class="code-comment"># Check if the request was successful</span>
if response.status_code == 200:
    <span class="code-comment"># Parse the HTML content</span>
    soup = BeautifulSoup(response.text, 'html.pa