慕田峪9158850
condition = {1:"a",2:"b",3:"c"}def exec_and(c1,c2):
return c1 and c2
args = [table.cell(row,k).value.strip() == v for k,v in condition.items()]
reduce(exec_and,args)## 简单点就是:condition = {1:"a",2:"b",3:"c"}
reduce(lambda c1,c2: c1 and c2,
[table.cell(row,k).value.strip() == v for k,v in condition.items()]
)