input: 
  from typing import Optional
  import requests
  
  def read_url(url: str) -> Optional[str]:
      """ Read the contents from a given URL and return the text if the request is successful.
      >>> read_url('https://www.example.com')
      '<html>...</html>'
      >>> read_url('https://www.nonexistenturl.com')
      None
      """
      r = requests.get(url)
      if r.status_code == 200:
          return r.text
      else:
          return None
  
output:     r = requests.get(url)
      if r.status_code == 200:
          return r.text
      else:
          return None