7 lines
243 B
Python
7 lines
243 B
Python
def find_duplicates(lst):
|
|
duplicates = []
|
|
for i in range(len(lst)):
|
|
for j in range(i + 1, len(lst)):
|
|
if lst[i] == lst[j] and lst[i] not in duplicates:
|
|
duplicates.append(lst[i])
|
|
return duplicates
|