input: def read_url(url: str) -> str:
      """
      Reads the contents from a given URL and returns the text content if the request is successful, otherwise returns None.
      
      >>> read_url("https://example.com")  # Assuming the URL is valid and accessible
      '<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'
  
      >>> read_url("https://nonexistentwebsite.com")  # Assuming the URL is invalid
      None
      """
      import requests
      r = requests.get(url)
      if r.status_code == 200:
          return r.text
      else:
          return None
output:     import requests
      r = requests.get(url)
      if r.status_code == 200:
          return r.text
      else:
          return None