input: Write a function to program a web scraper in Python that extracts the latest stock prices from specific websites for the given list of stock symbols. The function should return the stock prices as a list of strings, in the same order as the input list.
  import requests
  from bs4 import BeautifulSoup
  
  def extract_stock_prices(stocks):
      prices = []
      for stock in stocks:
          url = f"https://finance.yahoo.com/quote/{stock}"
          response = requests.get(url)
          soup = BeautifulSoup(response.text, 'html.parser')
          price = soup.find('div', {'class': 'My(6px) Pos(r) smartphone_Mt(6px)'}).find('span').text
          prices.append(price)
      return prices
  
  assert extract_stock_prices(["AAPL stocks", "MSFT stocks", "FB stocks", "GOOG stocks"]) == ["$150.00", "$250.00", "$350.00", "$450.00"]
  assert extract_stock_prices([]) == []
output: import requests
  from bs4 import BeautifulSoup
  
  def extract_stock_prices(stocks):
      prices = []
      for stock in stocks:
          url = f"https://finance.yahoo.com/quote/{stock}"
          response = requests.get(url)
          soup = BeautifulSoup(response.text, 'html.parser')
          price = soup.find('div', {'class': 'My(6px) Pos(r) smartphone_Mt(6px)'}).find('span').text
          prices.append(price)
      return prices