input: Write a python function to extract links from a given URL.
  assert extract_links("http://www.example.com") == ["http://www.iana.org/domains/example"]
  assert extract_links("http://example.org") == ["http://www.iana.org/domains/example"]
output: def extract_links(url):
      import requests
      from bs4 import BeautifulSoup
      response = requests.get(url)
      soup = BeautifulSoup(response.text, 'html.parser')
      links = [a['href'] for a in soup.find_all('a', href=True)]
      return links