input: Write a function that takes a list of stock names and returns their latest stock prices by scraping the respective pages from finance.yahoo.com. Use BeautifulSoup to parse the HTML and extract the price information. The function should print the price for each stock.
  
  def get_stock_price(stocks):
      import requests
      from bs4 import BeautifulSoup
  
      def fetch_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
  
      for stock in stocks:
          price = fetch_price(stock)
          print(f'The price of {stock} is {price}.')
  
  # assert test cases
  assert get_stock_price(["AAPL stocks", "MSFT stocks", "FB stocks", "GOOG stocks"]) == "The price of AAPL stocks is [price].\nThe price of MSFT stocks is [price].\nThe price of FB stocks is [price].\nThe price of GOOG stocks is [price]."
output: def get_stock_price(stocks):
      import requests
      from bs4 import BeautifulSoup
  
      def fetch_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
  
      for stock in stocks:
          price = fetch_price(stock)
          print(f'The price of {stock} is {price}.')