Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> lis=[1,2,1,3,2,5]
- >>> set ([i for i in lis if lis.count(i)>1])
- set([1, 2])
- >>> q=[]
- >>> for i in o:
- q.append(i)
- >>> q
- [1, 2] // 1 and 2 are the duplicates
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement