用户:
6212377查看:2 回复:1 评论:2 创建时间:2022-07-29T11:56:20
y = []
xx = 1
yy = 1
c = 0
for count in range(100):
c += 1
x.insert(c, random.randint(1, 10))
y.insert(c, random.randint(1, 10))
while(len(y) > 0):
xx += 1
for count in range(xx):
if (x[xx] == y[yy]):
del x[xx]
yy += 1
print(xx)
一个简单的查重程序
但运行后一直报错。
序列中没有此索引(index): list index out of range
求大神解决!!!!!!