Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # in_order_list_comprehensions.py
- bar=[123,'abc',0,'xyz',0,0,'gold','abc']
- foo=[a if a!=0 else '$$$' for a in bar]
- print foo
- 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