from random import randint
lst = [randint(1,10) for i in range(10)]
print(lst)
non_unique = [i for i in set(lst) if lst.count(i) > 1]
if len(non_unique) == 0:
print("Повторяющихся элементов нет")
else:
print(non_unique)
from random import randint
lst = [randint(1,10) for i in range(10)]
print(lst)
non_unique = [i for i in set(lst) if lst.count(i) > 1]
if len(non_unique) == 0:
print("Повторяющихся элементов нет")
else:
print(non_unique)