Given an array of stock prices for a day, where prices[i] is the price of the stock at time i, write a function that returns the maximum amount of money one could make in a day if he buys and sells at most once. [10,1] -> return 0 [7,2,1,5,10,3] -> return 9 [5,6,7,1,2] def stockPrices(prices): profit = 0 for i in range(len(prices)): for j in range(i+1,len(prices)): if prices[j] - prices[i] > profit profit = prices[j] - prices[i] return profit