标签: python list
这段代码有什么问题?它将给出索引错误。
r= [2, 3, 4, 2] for n in range (1, len (r)): for m in range (1, len (r)): print (r[n], r[m]) if n==m: pass elif r[n]==r[m]: r.remove(r[m]) print (r)