<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Create a Python script to scrape HTML data from a website.
<|im_end|>
<|im_start|>assistant
import requests
from bs4 import BeautifulSoup

url = "https://www.example.com/"
response = requests.get(url)
soup = BeautifulSoup(response.text, "html.parser")

# extract information from HTML
data = soup.find_all("div", {"class": "content"})

# save scraped data 
with open('filename.txt', 'w') as file:
    for content in data:
        file.write(str(content))<|im_end|>
