Logical operation between two Boolean lists

前端 未结 7 803
终归单人心
终归单人心 2021-02-07 15:42

I get a weird result and I try to apply the and or the or operator to 2 Boolean lists in python. I actually get the exact opposite of what I was expec

7条回答
  •  囚心锁ツ
    2021-02-07 16:13

    I think you need something like this:

    [x and y for x, y in zip([True, False, False], [True, True, False])]
    

提交回复
热议问题