Logical operation between two Boolean lists

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

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:00

    I think you need something like this:

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

提交回复
热议问题