什么是表达以下内容的更简单,更pythonic的方式?

时间:2022-03-11 22:38:11
return not a and not b

^ how do I express this in a better format

^我如何以更好的格式表达这一点

1 个解决方案

#1


14  

DeMorgan's Law, perhaps?

也许是德摩根定律?

return not (a or b)

I think it's sufficiently simple at that point

我认为那时候它足够简单了

#1


14  

DeMorgan's Law, perhaps?

也许是德摩根定律?

return not (a or b)

I think it's sufficiently simple at that point

我认为那时候它足够简单了