input: Write a function to scrape the latest stock prices from specific websites for given stock names. The function should take a list of stock names as input and return a list of their corresponding stock prices.
  
  def get_stock_prices(stocks):
      import requests
      from bs4 import BeautifulSoup
      def get_stock_price(stock):
          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
          return price
      prices = []
      for stock in stocks:
          price = get_stock_price(stock)
          prices.append(price)
      return prices
  
  assert get_stock_prices(["AAPL stocks", "MSFT stocks", "FB stocks", "GOOG stocks"])==['$148.83', '$302.32', '$325.57', '$2,894.78']
output: def get_stock_prices(stocks):
      import requests
      from bs4 import BeautifulSoup
      def get_stock_price(stock):
          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
          return price
      prices = []
      for stock in stocks:
          price = get_stock_price(stock)
          prices.append(price)
      return prices