gpt4 book ai didi

python - python中or运算符的使用方法

转载 作者:行者123 更新时间:2023-11-28 22:52:33 24 4
gpt4 key购买 nike

<分区>

在我的项目中,我使用过 or 但在某些情况下它有效,而在某些情况下它使我失败。我不明白为什么?

if (a or b) is not True:
# This works for me


if (a or b) == "Django" and (c or d) == "Pyramid":
# This fails me everytime

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com