input: Write a function to extract the latest stock prices from specific websites using Python's requests and BeautifulSoup libraries. The function should take a list of stock names as input and return a list of their respective prices. If any stock price cannot be found, it should return 'N/A' for that stock.
  assert get_stock_price(["AAPL stocks", "MSFT stocks", "FB stocks", "GOOG stocks"])==["150.00", "300.00", "350.00", "2500.00"]
  assert get_stock_price(["TSLA stocks", "NFLX stocks"])==["700.00", "550.00"]
  assert get_stock_price(["INVALID stocks"])==["N/A"]
  assert get_stock_price([])==[]
output: def get_stock_price(stock_names):
      import requests
      from bs4 import BeautifulSoup
      prices = []
      for stock in stock_names:
          url = f"https://example.com/stock/{stock.split()[0]}"
          response = requests.get(url)
          if response.status_code == 200:
              soup = BeautifulSoup(response.text, 'html.parser')
              price = soup.find('span', class_='price')
              if price:
                  prices.append(price.text)
              else:
                  prices.append('N/A')
          else:
              prices.append('N/A')
      return prices