Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # else_for_list_comprehension.py
- print [a if a!=0 else '$$$' for a in [123,'abc',0,'xyz',0,'gold']]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement