input: Write a function to read the contents from a given URL and return the content as a string if the request is successful. If the request fails, return None.
  assert read_url('https://example.com')=="<!doctype html>\n<html>\n<head>\n    <title>Example Domain</title>..."
  assert read_url('https://invalidurl.com')==None
  assert read_url('')==None
output: import requests
  
  def read_url(url):
      try:
          response = requests.get(url)
          response.raise_for_status()
          return response.text
      except requests.RequestException:
          return None