SHARE
TWEET

uniq_sublist

a guest Mar 19th, 2018 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sys
  2. sys.path.append(r'C:\Program Files (x86)\IronPython 2.7\Lib')
  3. from collections import Counter
  4.  
  5. a=[]
  6. for x in [Counter(i).items() for i in IN[0]]:  
  7.     for z in x:
  8.         if z[1]>1:
  9.             b=[]
  10.             for s in range(0, z[1]):               
  11.                 b.append(z[0])
  12.             a.append(b)        
  13. OUT = a
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top