input: Write a function to create a web scraper using Python that retrieves the 10 most recent articles from a given news website URL.
  
  def get_recent_articles(URL):
      import requests 
      from bs4 import BeautifulSoup 
      
      # get the source code 
      html_content = requests.get(URL).text 
      
      # parse the html content 
      soup = BeautifulSoup(html_content, "lxml") 
      
      # get all the articles  
      articles = soup.find_all('article') 
      
      # return the first 10 articles 
      return [article.text for article in articles[:10]]
  
  assert get_recent_articles('http://example.com/news')==['Article 1', 'Article 2', 'Article 3', 'Article 4', 'Article 5', 'Article 6', 'Article 7', 'Article 8', 'Article 9', 'Article 10']
  assert get_recent_articles('http://anotherwebsite.com/news')==['Article A', 'Article B', 'Article C', 'Article D', 'Article E', 'Article F', 'Article G', 'Article H', 'Article I', 'Article J']
  assert get_recent_articles('http://emptywebsite.com/news')==[]
  assert get_recent_articles('http://fewarticles.com/news')==['First Article', 'Second Article']
  assert get_recent_articles('http://wrongformat.com/news')==[]
  assert get_recent_articles('http://nonexistenturl.com/news')==[]
output: def get_recent_articles(URL):
      import requests 
      from bs4 import BeautifulSoup 
      
      try:
          html_content = requests.get(URL).text 
          soup = BeautifulSoup(html_content, "lxml") 
          articles = soup.find_all('article') 
          return [article.text for article in articles[:10]]
      except:
          return []