box = [10, 7, 8, 11]
answer = []
for i in range(len(box)):
for j in range(i+1,len(box)):
if box[j] > box[i]:
answer.append(j + 1)
break
else:
answer.append(0)
print(answer)
To embed this project on your website, copy the following code and paste it into your website's HTML: