Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [-2,4,3,-1,2]
- [0,1,1,0,1]
- In [188]: L = [-2,4,3,-1,2]
- In [189]: [int(i>0) for i in L]
- Out[189]: [0, 1, 1, 0, 1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement