input: Write a python function to extract all external links from a given webpage.
  assert extract_external_links('https://example.com') == ['http://example.com/page1', 'https://example.com/page2']
  assert extract_external_links('https://anotherexample.com') == ['http://anotherexample.com/page1', 'https://anotherexample.com/page2']
output: def extract_external_links(url):
      import requests
      from bs4 import BeautifulSoup
      from urllib.parse import urlparse
  
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
      external_links = []
      
      base_domain = urlparse(url).netloc
  
      for link in soup.find_all('a', href=True):
          link_url = urlparse(link['href'])
          if link_url.netloc and link_url.netloc != base_domain:
              external_links.append(link['href'])
  
      return external_links