prices = [1000, 800, 900, 1200, 700, 1500]
min_price = prices[0]
max_profit = 0
for price in prices:
if price < min_price:
min_price = price
else:
profit = price - min_price
max_profit = max(max_profit, profit)
print(max_profit)
To embed this project on your website, copy the following code and paste it into your website's HTML: