input: Write a function to read the contents from a given URL and return the text if the request is successful (status code 200). If the request is unsuccessful, return None.
  assert read_url("https://example.com")=="example content"
  assert read_url("https://invalid-url.com")==None
  assert read_url("https://nonexistent-url.com")==None
output: import requests
  
  def read_url(url):
      try:
          response = requests.get(url)
          if response.status_code == 200:
              return response.text
          else:
              return None
      except requests.RequestException:
          return None