Skip to main content
 首页 » 编程设计

python之If Else 语句、AND OR 逻辑运算和文本文件(使用 Python)

2024年09月07日7insus

<分区>

我在 if else 语句中遇到 AND 和 OR 的问题。这是我的代码:

if subject == 'history' or subject == 'History' and unit == 'WWII' or unit == 'ww2': 

有什么办法解决这个问题吗?