input: Write a function to fetch and print headlines from a news website using BeautifulSoup.
  assert fetch_headlines('https://news.example.com') == ['Headline 1', 'Headline 2', 'Headline 3']
  assert fetch_headlines('https://news.example.com/tech') == ['Tech Headline 1', 'Tech Headline 2']
  assert fetch_headlines('https://news.example.com/sports') == ['Sports Headline 1', 'Sports Headline 2', 'Sports Headline 3']
output: def fetch_headlines(url):
      import requests
      from bs4 import BeautifulSoup
  
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
  
      headlines = []
      for headline in soup.find_all('h1', class_='headline'):
          headlines.append(headline.get_text(strip=True))
  
      return headlines