Code -Komplexitätsrechner online
li = [8,3,7,2,3,9,4]
max_element = max(li)
min_element = min(li)
total = max_element - min_element
x = len(li)
for i in li:
for j in range(x):
if i - li[j] == total:
print("buy price is=", li[j],"sell price is= ",i ,"the profit is ", i - li[j])
Pratipal Singh Rajput