def no_repeat():
"""去掉重复的元素并返回结果->lis,提取重复的元素返回结果->list_repeat"""
a = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10]
lis = []
list_repeat = []
for i in a:
if i not in lis:
lis.append(i)
print(lis)
for j in lis:
if a.count(j) > 1:
list_repeat.append(j)
print(list_repeat)
no_repeat()