input: from typing import Optional
  
  def read_url(url: str) -> Optional[str]:
      """
      Read the contents from a given URL. If the request is successful (status code 200), 
      return the content as a string. Otherwise, return None.
      
      >>> read_url("https://www.example.com")
      '<!doctype html><html><body><h1>Example Domain</h1>...</body></html>'
      
      >>> read_url("https://www.non_existent_url.com")
      None
      """
output:     import requests
  
      try:
          response = requests.get(url)
          if response.status_code == 200:
              return response.text
          else:
              return None
      except requests.RequestException:
          return None