input: Write a function to create a web scraper that collects the title and content from the homepage of a given website using Python. The scraper should use the requests and BeautifulSoup libraries from bs4. If the title or content is not found, the function should return None for that respective element. The function should take a single URL string as input.
  def scrape_website(url):
      import requests
      import bs4
  
      r = requests.get(url)
      html = bs4.BeautifulSoup(r.text, "html.parser")
      
      # Find title
      title = html.find('title')
      title_text = title.text if title else None
      
      # Find content
      content = html.find('div', {'class': 'content'})
      content_text = content.text if content else None
      
      return title_text, content_text
  
  assert scrape_website('https://www.example.com')==('Example Domain', 'This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.')
  assert scrape_website('https://www.nonexistentexample.com')==(None, None)
  assert scrape_website('https://www.anotherexample.com')==('Sample title', 'Sample content')
  assert scrape_website('https://www.withnotitleexample.com')==(None, 'Some content without a title')
  assert scrape_website('https://www.withnocontentexample.com')==('Title without content', None)
output: def scrape_website(url):
      import requests
      import bs4
  
      r = requests.get(url)
      html = bs4.BeautifulSoup(r.text, "html.parser")
      
      # Find title
      title = html.find('title')
      title_text = title.text if title else None
      
      # Find content
      content = html.find('div', {'class': 'content'})
      content_text = content.text if content else None
      
      return title_text, content_text