2. Python program to find duplicates in an Array

X = [1,2,3,4,5,1,2,3,4,5,6]
print("Duplicate elements in array: " ) ;
for i in range (0, len(X)):
for j in range (i+1, len(X)):
if (X[i] == X[j]):
print(X[j]) ;

1 Like

@iqrarsheikh117

Correct, keep it up.