我需要选择列表中的每个项目,然后在每个项目之间放置逻辑运算符
例如
说我是否有清单:
<table>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
<td>Cell 4</td>
<tr>
</table>
我想要:
if(prevProps.active !== this.props.active && this.props.active !== null) {
答案 0 :(得分:1)
from operator import and_
from functools import reduce
reduce(and_, ['a' , 'b' , 'c'], True)
是的,这不适用于字符
答案 1 :(得分:0)
all
函数不是您要尝试的功能吗?
a = ['a','b','c']
all(a)