Advertisement
here2share

# in_order_list_comprehensions.py

Jan 26th, 2017
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. # in_order_list_comprehensions.py
  2. bar=[123,'abc',0,'xyz',0,0,'gold','abc']
  3. foo=[a if a!=0 else '$$$' for a in bar]
  4.  
  5. print foo
  6. print [foo[bar] for bar in range(len(foo)) if not foo[:bar].count(foo[bar])]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement