下面的if语句成功,并且输出s的值。但是,如果删除:和/或空格条件,则它将失败。我对为什么它首先成功感到困惑。
s="( )" if ("if" and ":" and " ") in s: print(s)
python
python ×1