Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. >>> lis=[1,2,1,3,2,5]
  2. >>> set ([i for i in lis if lis.count(i)>1])
  3. set([1, 2])
  4. >>> q=[]
  5. >>> for i in o:
  6. q.append(i)
  7.  
  8.  
  9. >>> q
  10. [1, 2] // 1 and 2 are the duplicates
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement