input: Write a function to read the contents from a given URL. If the request is successful, return the content of the URL. If the request fails, return None.
  
  assert read_url('http://www.example.com/') != None
  assert read_url('http://invalidurl.com/') == None
output: def read_url(url):
      try:
          import requests
          response = requests.get(url)
          response.raise_for_status()
          return response.text
      except:
          return None