Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14301

Compare two lists elementwise with OR

$
0
0

I want to compare two lists of the same length by their elements with an OR.

>>> [0,0,1,1,0] or [1,1,0,1,0][0, 0, 1, 1, 0]

I want the outcome to be

[1,1,1,1,0]

How can I achieve the desired comparison?


Viewing all articles
Browse latest Browse all 14301

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>