length = len(list1)
for i in range(0, length): for j in range(i+1, length):
if list1[i] == list1[j]:
#操作