input: Write a python function to extract and return the list of S&P 500 companies from the given Wikipedia page using requests and BeautifulSoup.
  assert 'Apple Inc.' in extract_sp500_companies()
  assert 'Microsoft' in extract_sp500_companies()
  assert 'Amazon.com Inc.' in extract_sp500_companies()
output: def extract_sp500_companies():
      import requests
      from bs4 import BeautifulSoup
  
      url = "https://en.wikipedia.org/wiki/List_of_S%26P_500_companies"
      response = requests.get(url)
      soup = BeautifulSoup(response.content, 'html.parser')
  
      table = soup.find('table', {'id': 'constituents'})
      companies = []
  
      for row in table.find_all('tr')[1:]:
          columns = row.find_all('td')
          company_name = columns[1].text.strip()
          companies.append(company_name)
  
      return companies