input: Write a function to read the contents of a given URL. If the request is successful, return the text content. If the request is not successful, return None.
  def read_url(url):
    r = requests.get(url)
    if r.status_code == 200:
      return r.text
    else:
      return None
  assert read_url('https://www.example.com')!=None
  assert read_url('https://www.nonexistentwebsite.com')==None
output: def read_url(url):
    r = requests.get(url)
    if r.status_code == 200:
      return r.text
    else:
      return None