Code 05: Find all the duplicate elements in a list in Python | 365 Days of Code

Опубликовано: 01 Февраль 2025
на канале: Code House
563
4

Python Program to find all the duplicate elements existing in a list.
Code -
Find the duplicate elements from a list
data = [34,90,20,48,23,90,23] # Sol is [23,90]
repeated_list = []
for each in data:
if each not in repeated_list:
if data.count(each) > 1:
repeated_list.append(each)
print(repeated_list)
#Thanks