Advertisement
here2share

# uniquify.py

Apr 26th, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. # uniquify.py
  2.  
  3. z = list('322232331x1yyy2zzz3')
  4. z = [z[x] for x in range(len(z)) if z[x] not in z[:x]]
  5. print z
  6. # 3 2 1 x y z
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement