def find_best_stock_profit(stock_prices):
    """Takes in a list of stock prices and returns the best possible profit possible from buying and selling"""
    if type(stock_prices) != list:
        raise TypeError(
            "The argument for find_best_stock_profit must be of type list.")
    elif len(stock_prices) < 1:
        return 0

    purchase_price = stock_prices[0]
    highest_profit = 0

    for i in range(1, len(stock_prices)):
        current_price = stock_prices[i]

        if current_price - purchase_price < 0:
            purchase_price = current_price
        elif current_price - purchase_price > highest_profit:
            highest_profit = current_price - purchase_price

    return highest_profit