arr = [10,8,13,9,15] answer = [] for i in range(len(arr)): for j in range(i+1,len(arr)): if arr[i] < arr[j]: 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: