Python program to find duplicate in an array . .

arr = [10,5,10,3,4,1,2,3,2,4,6,5,7,9,1]
missing_element = []
dup_ele=[]
for i in arr:
if i not in missing_element:
missing_element.append(i)
elif i not in dup_ele:
dup_ele.append(i)

print(" The dup elements are:",dup_ele)

1 Like

@mick4mayank
Correct :100: keep it up