

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Write a python program to display duplicates from a list of integers.
a=eval(input('Enter a list:\t')) l=[ ] print('Elements with count more than one:') for i in a: if i not in l:
l.append(i) if a.count(i)>1: print(i)
Enter a list: [9,4,4,5,6,3,3,3,8,2,2,1] Elements with count more than one: 4 3 2
The python program to display duplicates from a list of integers is successfully completed and the output is verified.