input: Write a function to generate a Python program that reads the contents from a given URL. The function should return the text content if the request is successful (status code 200) and return None otherwise.
  
  assert read_url("https://example.com")=="<!doctype html>\n<html>\n<head>\n...\n"
  assert read_url("https://nonexistenturl.com")==None
output: import requests
  
  def read_url(url):
      response = requests.get(url)
      if response.status_code == 200:
          return response.text
      else:
          return None