input: Write a function to read the contents from a given URL and return the text if the request is successful, otherwise return None.
  
  assert read_url("http://example.com") is not None
  assert read_url("http://invalidurl.com") is None
  assert read_url("http://nonexistentwebsite.com") is None
  assert read_url("http://google.com") is not None
  assert read_url("http://example.com")==read_url("http://example.com")
output: import requests
  
  def read_url(url):
      try:
          response = requests.get(url)
          response.raise_for_status()
          return response.text
      except requests.RequestException:
          return None