Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/354.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 复合if语句_Python_Python 3.x - Fatal编程技术网

Python 复合if语句

Python 复合if语句,python,python-3.x,Python,Python 3.x,对于python来说,我是新手,无法让下面的简单复合if语句工作 if A == B & C >= D & C <= E: 如果A==B&C>=D&C如果A==B和C>=D和C&是A,而不是您要找的 这样做: if A == B and C >= D and C <= E: 如果A==B和C>=D和C&是A,则不是逻辑的和。 if A == B and C >= D and C <= E:

对于python来说,我是新手,无法让下面的简单复合if语句工作

if A == B & C >= D & C <= E:
如果A==B&C>=D&C
如果A==B和C>=D和C
&
是A,而不是您要找的

这样做:

if A == B and C >= D and C <= E:
如果A==B和C>=D和C
&
是A,则不是逻辑的
if A == B and C >= D and C <= E: