input: 
  from typing import Optional
  
  def read_url(url: str) -> Optional[str]:
      """ Reads the content from a given URL and returns the text if the request is successful.
      Otherwise, returns None.
      >>> read_url('https://www.example.com')
      '<!doctype html>\n<html>\n<head>\n    <title>Example Domain</title>\n
      ...
      (more HTML content)
      ...
      </body>\n</html>\n'
      >>> read_url('https://www.nonexistentwebsite.com')
      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