标签: python arrays
问题删除Python数组重复项 a = [1,2,2,4,5,5]产生一个代码,输出到a = [1,2,4,5] 下面的代码是我做的,但是它给出了错误的值,请帮助我
a = [1,2,2,4,5,5] anw = [] for i in range(len(a)-1): if a[i+1] != a[i]: anw.append(i) else: continue print(anw)