input: Write a function to scrape the headlines from a given online news website. The function should take the URL of the website as input, fetch the HTML content, parse it to extract all the headlines, and print them.
  
  
  def scrape_headlines(url):
      import requests
      from bs4 import BeautifulSoup 
  
      # get the response in the form of html
      r = requests.get(url) 
  
      # create a beautifulsoup object to parse contents 
      soup = BeautifulSoup(r.content, 'html5lib') 
  
      # find headlines from the parsed page  
      headlines = soup.find_all('h2') 
  
      # Print the headlines 
      for headline in headlines: 
          print(headline.text)
  
  # Example usages
  scrape_headlines("https://www.news.com/")
  
output: def scrape_headlines(url):
      import requests
      from bs4 import BeautifulSoup 
  
      # get the response in the form of html
      r = requests.get(url) 
  
      # create a beautifulsoup object to parse contents 
      soup = BeautifulSoup(r.content, 'html5lib') 
  
      # find headlines from the parsed page  
      headlines = soup.find_all('h2') 
  
      # Print the headlines 
      for headline in headlines: 
          print(headline.text)