fork download
  1. def not_unique(data):
  2. data1 = []
  3. for d in data:
  4. if data.count(d) != 1:
  5. data1.append(d)
  6. return data1
  7.  
  8. lst = [1,1,2,3,5,6,6,7,8,8]
  9.  
  10. print(not_unique(lst))
Success #stdin #stdout 0.02s 9016KB
stdin
Standard input is empty
stdout
[1, 1, 6, 6, 8, 8]