{"id":6159,"date":"2024-08-17T18:01:01","date_gmt":"2024-08-17T10:01:01","guid":{"rendered":""},"modified":"2024-08-17T18:01:01","modified_gmt":"2024-08-17T10:01:01","slug":"python\u903b\u8f91\u7b26\u53f7\u4f18\u5148\u7ea7_\u5de6\u79fb\u8fd0\u7b97\u7b26","status":"publish","type":"post","link":"https:\/\/mushiming.com\/6159.html","title":{"rendered":"python\u903b\u8f91\u7b26\u53f7\u4f18\u5148\u7ea7_\u5de6\u79fb\u8fd0\u7b97\u7b26"},"content":{"rendered":"

\n <\/path> \n<\/svg> <\/p>\n

\u903b\u8f91\u8fd0\u7b97\u7b26\u4e2d\u6bd4\u8f83\u5e38\u89c1\u7684\u5c31\u662fnot<\/code>\uff0cand<\/code>\uff0c or<\/code>\uff0c ><\/code>\uff0c <<\/code>\uff0c\u4ee5\u53ca==<\/code>\uff0c\u7406\u8bba\u4e0a\u6765\u8bf4\u6bd4\u8f83\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7>not>and>or<\/code>\u3002
\u4e3a\u4e86\u8bf4\u6e05\u695a\u5b83\u4eec\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u6211\u4eec\u9700\u8981\u5148\u660e\u786eand<\/code>\u548cor<\/code>\u8fd0\u884c\u65f6\u5019\u7684\u7279\u70b9\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n

class<\/span> Debug<\/span>:<\/span> def<\/span> mainProgram<\/span>(<\/span>self)<\/span>:<\/span> self.<\/span>x0 =<\/span> 0<\/span> self.<\/span>x1 =<\/span> 1<\/span> self.<\/span>x2 =<\/span> 5<\/span> print<\/span>(<\/span>self.<\/span>x0 and<\/span> self.<\/span>x1)<\/span> # 0<\/span> print<\/span>(<\/span>self.<\/span>x1 and<\/span> self.<\/span>x0)<\/span> # 0<\/span> print<\/span>(<\/span>self.<\/span>x1 and<\/span> self.<\/span>x2)<\/span> # 5<\/span> print<\/span>(<\/span>self.<\/span>x2 and<\/span> self.<\/span>x1)<\/span> # 1<\/span> print<\/span>(<\/span>self.<\/span>x0 or<\/span> self.<\/span>x1)<\/span> # 1<\/span> print<\/span>(<\/span>self.<\/span>x1 or<\/span> self.<\/span>x0)<\/span> # 1<\/span> print<\/span>(<\/span>self.<\/span>x1 or<\/span> self.<\/span>x2)<\/span> # 1<\/span> print<\/span>(<\/span>self.<\/span>x2 or<\/span> self.<\/span>x1)<\/span> # 5<\/span> print<\/span>(<\/span>self.<\/span>x1 ><\/span> self.<\/span>x0)<\/span> # True<\/span> print<\/span>(<\/span>self.<\/span>x1 <<\/span> self.<\/span>x0)<\/span> # False<\/span> print<\/span>(<\/span>self.<\/span>x1 ==<\/span> self.<\/span>x0)<\/span> # False<\/span> if<\/span> __name__ ==<\/span> \"__main__\"<\/span>:<\/span> main =<\/span> Debug(<\/span>)<\/span> main.<\/span>mainProgram(<\/span>)<\/span> <\/code><\/pre>\n

\u6211\u4eec\u77e5\u9053\u5728\u7f16\u7a0b\u8bed\u8a00\u4e2d\u5b58\u5728\u4e00\u4e2a\u60ef\u4f8b<\/strong>\uff0c\u6570\u5b570\u9ed8\u8ba4\u4e3aFalse,\u5176\u4ed6\u4e0d\u4e3a0\u7684\u6570\u5b57\u9ed8\u8ba4\u4e3aTrue\u3002<\/strong> \u4ece\u4e0a\u8ff0\u4ee3\u7801\u4e2d\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u53d8\u91cfself.x0<\/code>\u7684\u503c\u4e3a0<\/code>\uff0cself.x1<\/code>\u7684\u503c\u4e3a1<\/code>\uff0cself.x2<\/code>\u7684\u503c\u4e3a5<\/code>\u3002self.x0 and self.x1<\/code>\u7684\u503c\u4e3a0<\/code>\uff0cself.x1 and self.x0<\/code>\u7684\u503c\u4e3a0\uff0c\u6211\u4eec\u770b\u5230and<\/code>\u7684\u7ed3\u679cTrue and False<\/code>\u603b\u662f\u4e3aFalse<\/code>\uff0c\u800c0<\/code>\u5728\u610f\u4e49\u4e0a\u7b49\u540c\u4e8eFalse<\/code>\uff08\u6ce8\u610f\u4ee3\u7801\u4e2d\u5e76\u4e0d\u7b49\u540c\uff09\uff0c\u56e0\u6b64\u65e0\u8bba\u8c03\u6362self.x1 and self.x0<\/code>\u7684\u5148\u540e\u987a\u5e8f\u4e0e\u5426\uff0c\u7ed3\u679c\u5747\u4e3a0<\/code>\u5c31\u4e0d\u7a00\u5947\u4e86\u3002\u7136\u800c\u6211\u4eec\u53d1\u73b0\u5f53\u6211\u4eec\u8c03\u6362self.x1<\/code>\u4e0eself.x2<\/code>\u7684\u5148\u540e\u987a\u5e8f\u65f6\uff0c\u4f1a\u8f93\u51fa\u5904\u5728\u7b2c\u4e8c\u4e2a\u4f4d\u7f6e\u4e0a\u7684\u503c\uff0c\u8fd9\u4e2a\u4e5f\u5f88\u597d\u7406\u89e3\uff0c\u56e0\u4e3a\u975e\u96f6\u6574\u6570\u610f\u4e49\u4e0a\u7b49\u540c\u4e8eTrue<\/code>,True and True<\/code>\u7684\u7ed3\u679c\u4e3aTrue<\/code>\uff0c\u6240\u4ee5\u4ee3\u7801\u9700\u8981\u5bf9and<\/code>\u524d\u540e\u7684\u4e24\u4e2a\u6761\u4ef6\u90fd\u8fdb\u65b0\u5224\u65ad\uff0c\u6700\u540e\u8f93\u51fa\u7b2c\u4e8c\u4e2a\u4f4d\u7f6e\u7684\u7ed3\u679c\u3002\u63a5\u7740\u6211\u4eec\u770b\u5230\u65e0\u8bba\u8c03\u6362\u987a\u5e8f\u4e0e\u5426\uff0cself.x0 or self.x1<\/code>\u7684\u503c\u5747\u4e3a1<\/code>\u3002\u8fd9\u4e2a\u4e5f\u5f88\u597d\u7406\u89e3\uff0cTrue or False<\/code>\u7684\u7ed3\u679cTrue<\/code>\uff0c\u6240\u4ee5\u5e94\u5f53\u4fdd\u7559True<\/code>\u7684\u7ed3\u679c\uff0c\u6700\u7ec8\u7ed3\u679c\u4e3a1<\/code>\u3002\u518d\u63a5\u4e0b\u6765\u6211\u4eec\u770b\u5230\u5f53\u6211\u4eec\u8c03\u6362\u5148\u540e\u4f4d\u7f6e\u540e\uff0cself.x1 or self.x2<\/code>\u7684\u8f93\u51fa\u7ed3\u679c\u4e3a1<\/code>\uff0cself.x2 or self.x1<\/code>\u7684\u8f93\u51fa\u7ed3\u679c\u4e3a5<\/code>\uff0cpython\u9ed8\u8ba4\u8f93\u51fa\u7684\u662f\u7b2c\u4e00\u4e2a\u4f4d\u7f6e\u4e0a\u7684\u7ed3\u679c\u3002\u7531\u6b64\u6211\u4eec\u5f97\u5230\u4ee5\u4e0b\u7ed3\u8bba\uff0c\u5728python\u4e2d\uff0cand\u903b\u8f91\u8fd0\u7b97\u7b26\uff0c\u5f53and\u524d\u540e\u7684\u6761\u4ef6\u5747\u4e3a\u771f\u65f6\uff0c\u8f93\u51fa\u540e\u4e00\u4e2a\u6761\u4ef6\u7684\u7ed3\u679c\uff0c\u5f53\u524d\u540e\u7684\u6761\u4ef6\u4e3a\u4e00\u771f\u4e00\u5047\u65f6\u8f93\u51fa\u6761\u4ef6\u4e3a\u5047\u7684\u7ed3\u679c\u3002or\u903b\u8f91\u8fd0\u7b97\u7b26\u5f53or\u524d\u540e\u7684\u6761\u4ef6\u5747\u4e3a\u771f\u65f6\uff0c\u8f93\u51fa\u524d\u4e00\u4e2a\u6761\u4ef6\u7684\u7ed3\u679c\uff0c\u5f53\u524d\u540e\u7684\u6761\u4ef6\u4e3a\u4e00\u771f\u4e00\u5047\u65f6\uff0c\u8f93\u51fa\u6761\u4ef6\u4e3a\u771f\u7684\u7ed3\u679c\u3002\u800c\u6bd4\u8f83\u8fd0\u7b97\u7b26\u7684\u7ed3\u679c\u901a\u5e38\u4e3aTrue\u6216\u8005False\u3002<\/strong>
\u63a5\u4e0b\u6765\u6211\u4eec\u4f1a\u4f7f\u7528\u4e0a\u9762\u7684\u7ed3\u8bba\u6765\u63a2\u7d22and<\/code>\uff0c or<\/code>\uff0c ><\/code>\uff0c <<\/code>\uff0c\u4ee5\u53ca==<\/code>\u903b\u8f91\u8fd0\u7b97\u7684\u4f18\u5148\u7ea7\u3002\u9996\u5148\u6211\u4eec\u5c06\u4ed6\u4eec\u5206\u4e3a\u4e09\u7c7b\uff0cnot<\/code>\u4e3a\u4e00\u7c7b\uff0cand<\/code>\u4e3a\u4e00\u7c7b\uff0cor<\/code>\u4e3a\u4e00\u7c7b\uff0c\u6bd4\u8f83\u8fd0\u7b97\u7b26 ><\/code>\uff0c <<\/code>\uff0c\u4ee5\u53ca==<\/code>\u4e3a\u4e00\u7c7b\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n

class<\/span> Debug<\/span>:<\/span> def<\/span> mainProgram<\/span>(<\/span>self)<\/span>:<\/span> self.<\/span>x0 =<\/span> 0<\/span> self.<\/span>x1 =<\/span> 1<\/span> self.<\/span>x2 =<\/span> 5<\/span> print<\/span>(<\/span>self.<\/span>x1 ><\/span> self.<\/span>x0 and<\/span> self.<\/span>x2)<\/span> # 5<\/span> print<\/span>(<\/span>self.<\/span>x1 <<\/span> self.<\/span>x0 and<\/span> self.<\/span>x2)<\/span> # False<\/span> if<\/span> __name__ ==<\/span> \"__main__\"<\/span>:<\/span> main =<\/span> Debug(<\/span>)<\/span> main.<\/span>mainProgram(<\/span>)<\/span> <\/code><\/pre>\n

\u6211\u4eec\u53ef\u4ee5\u770b\u5230self.x1 > self.x0 and self.x2<\/code>\u8f93\u51fa\u7684\u7ed3\u679c\u4e3a5<\/code>\u800cself.x1 < self.x0 and self.x2<\/code>\u7684\u7ed3\u679c\u4e3aFalse<\/code>\u3002\u5bf9\u4e8eself.x1 > self.x0 and self.x2<\/code>\u6765\u8bf4\uff0c\u5982\u679c\u6bd4\u8f83\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u8f83\u9ad8\uff0c\u5148\u6267\u884cself.x1 > self.x0<\/code>\u6761\u4ef6\u5224\u65ad\uff0c\u7ed3\u679c\u5e94\u8be5\u4e3aTrue<\/code>\uff0c\u518d\u6267\u884cTrue and 5<\/code>(\u53d8\u91cfself.x2<\/code>\u7684\u503c\u4e3a5<\/code>)\u7684\u7ed3\u679c\u6839\u636e\u6211\u4eec\u4e4b\u524d\u603b\u89c9\u5f97\u89c4\u5f8b\u5e94\u8be5\u4e3a5<\/code>\u3002\u5bf9\u4e8eself.x1 < self.x0 and self.x2<\/code>\u6765\u8bf4\uff0cself.x1 < self.x0<\/code>\u7684\u7ed3\u679c\u4e3aFalse<\/code>\uff0c\u800cFalse and 5<\/code>\u7684\u7ed3\u679c\u6839\u636e\u4e4b\u524d\u7684\u89c4\u5f8b\u5e94\u8be5\u4e3aFalse<\/code>\u3002\u90a3\u4e48\u5982\u679c\u6bd4\u8f83\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u4f4e\u4e8eand<\/code>\u5462\uff1f\u5bf9self.x1 > self.x0 and self.x2<\/code>\u800c\u8a00\uff0cself.x0 and self.x2<\/code>\u7684\u7ed3\u679c\u4e3a0<\/code>\uff0c1 > 0<\/code>\u7684\u7ed3\u679c\u4e3aTrue<\/code>\uff0c\u6240\u4ee5\u6700\u7ec8\u7684\u7ed3\u679c\u5e94\u8be5\u4e3aTrue<\/code>\uff0c\u5f88\u660e\u663e\u4e0e\u6211\u4eec\u5f97\u5230\u7684\u7ed3\u679c\u4e0d\u7b26\u3002\u7531\u6b64\u6211\u4eec\u53ef\u4ee5\u5f97\u5230\u6bd4\u8f83\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u9ad8\u4e8eand\u3002<\/strong>
\u8054\u60f3\u4e00\u4e0b\u6211\u4eec\u5728\u5199\u4ee3\u7801\u7684\u65f6\u5019\u7ecf\u5e38\u4f7f\u7528\u7684\u6761\u4ef6\u8bed\u53e5\uff0cif x > 30 and x < 100:<\/code>,\u901a\u5e38\u6211\u4eec\u5e76\u4e0d\u4f1a\u7ed9and<\/code>\u4e24\u4fa7\u7684\u6bd4\u8f83\u8fd0\u7b97\u7b26\u6761\u4ef6\u90e8\u5206\u6dfb\u52a0\u62ec\u53f7\uff0c\u8fd9\u4e5f\u662f\u56e0\u4e3a\u6bd4\u8f83\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u9ad8\u4e0eand<\/code>\u7684\u539f\u56e0\u3002<\/strong>
\u63a5\u4e0b\u6765\u6211\u4eec\u6bd4\u8f83not<\/code>\u8fd0\u7b97\u7b26\u4e0eor<\/code>\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u3002\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n

class<\/span> Debug<\/span>:<\/span> def<\/span> mainProgram<\/span>(<\/span>self)<\/span>:<\/span> self.<\/span>x1 =<\/span> 1<\/span> print<\/span>(<\/span>not<\/span> self.<\/span>x1 or<\/span> self.<\/span>x1)<\/span> # 1<\/span> if<\/span> __name__ ==<\/span> \"__main__\"<\/span>:<\/span> main =<\/span> Debug(<\/span>)<\/span> main.<\/span>mainProgram(<\/span>)<\/span> <\/code><\/pre>\n

\u6211\u4eec\u770b\u5230\u6700\u7ec8\u7684\u8f93\u51fa\u7ed3\u679c\u4e3a1<\/code>\uff0c\u5047\u8bbeor<\/code>\u7684\u8fd0\u7b97\u7b26\u4f18\u5148\u7ea7\u8f83\u9ad8\uff0cself.x1 or self.x1<\/code>\u7684\u7ed3\u679c\u5e94\u4e3a1<\/code>\uff0cnot 1<\/code>\u7684\u7ed3\u679c\u5e94\u8be5\u4e3a0<\/code>\u3002\u4e0e\u8f93\u51fa\u7ed3\u679c\u4e0d\u7b26\u5408\uff0c\u6211\u4eec\u518d\u5047\u8bbenot<\/code>\u7684\u4f18\u5148\u7ea7\u8f83\u9ad8\uff0cnot self.x1<\/code>\u4e3anot 1<\/code>\uff0c\u7ed3\u679c\u4e3aFalse<\/code>\uff0cFalse or 1<\/code>\u7684\u7ed3\u679c\u4e3a1<\/code>\uff0c\u4e0e\u6211\u4eec\u5f97\u5230\u7684\u7ed3\u679c\u4e00\u81f4\uff0c\u56e0\u6b64\u63a8\u65ad\uff0cnot\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u9ad8\u4e8eor\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u3002<\/strong>
\u63a5\u4e0b\u6765\u6211\u4eec\u518d\u6bd4\u8f83and<\/code>\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u4e0eor<\/code>\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u3002\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n

class<\/span> Debug<\/span>:<\/span> def<\/span> mainProgram<\/span>(<\/span>self)<\/span>:<\/span> self.<\/span>x0 =<\/span> 0<\/span> self.<\/span>x1 =<\/span> 1<\/span> self.<\/span>x2 =<\/span> 2<\/span> print<\/span>(<\/span> self.<\/span>x0 and<\/span> self.<\/span>x1 or<\/span> self.<\/span>x2)<\/span> # 2<\/span> print<\/span>(<\/span> self.<\/span>x1 and<\/span> self.<\/span>x0 or<\/span> self.<\/span>x2)<\/span> # 2 <\/span> if<\/span> __name__ ==<\/span> \"__main__\"<\/span>:<\/span> main =<\/span> Debug(<\/span>)<\/span> main.<\/span>mainProgram(<\/span>)<\/span> <\/code><\/pre>\n

\u6211\u4eec\u5047\u8bbeor<\/code>\u7684\u4f18\u5148\u7ea7\u8f83\u9ad8\uff0c\u5bf9self.x0 and self.x1 or self.x2<\/code>\u6765\u8bf4\uff0c\u6839\u636e\u524d\u9762\u603b\u7ed3\u7684\u89c4\u5f8bself.x1 or self.x2<\/code>\u7684\u7ed3\u679c\u5e94\u8be5\u4e3a1<\/code>\uff0cself.x0 and 1<\/code>\u7684\u7ed3\u679c\u4e3a0<\/code>\u4e0e\u6211\u4eec\u7684\u7ed3\u679c\u4e3a2<\/code>\u4e0d\u7b26\u5408\u3002\u56e0\u6b64\u8fdb\u4e00\u6b65\u8003\u8651or<\/code>\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u4f4e\u4e8eand<\/code>\u3002self.x0 and self.x1<\/code>\u7684\u7ed3\u679c\u4e3a0<\/code>\uff0c0 or self.x2<\/code>\u7684\u7ed3\u679c\u4e3a2<\/code>\u3002\u8fdb\u4e00\u6b65\u53ef\u4ee5\u9488\u5bf9self.x1 and self.x0 or self.x2<\/code>\u8fdb\u884c\u9a8c\u8bc1\uff0c\u8fd9\u91cc\u7701\u7565\u8ba8\u8bba\u8fc7\u7a0b\u3002\u6700\u7ec8\u6211\u4eec\u5f97\u5230\u7ed3\u8bba\uff0cand\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u5927\u4e8eor\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u3002<\/strong>
\u540c\u7406\u4f7f\u7528\u5982\u4e0b\u4ee3\u7801\u53ef\u4ee5\u6bd4\u8f83not<\/code>\u7b97\u7b26\u4e0eand<\/code>\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u3002<\/p>\n

class<\/span> Debug<\/span>:<\/span> def<\/span> mainProgram<\/span>(<\/span>self)<\/span>:<\/span> self.<\/span>x0 =<\/span> 0<\/span> self.<\/span>x1 =<\/span> 1<\/span> print<\/span>(<\/span>not<\/span> 0<\/span>)<\/span> # True<\/span> print<\/span>(<\/span>not<\/span> 1<\/span>)<\/span> # False<\/span> print<\/span>(<\/span>not<\/span> self.<\/span>x0 and<\/span> self.<\/span>x1)<\/span> # 1<\/span> if<\/span> __name__ ==<\/span> \"__main__\"<\/span>:<\/span> main =<\/span> Debug(<\/span>)<\/span> main.<\/span>mainProgram(<\/span>)<\/span> <\/code><\/pre>\n

\u5f88\u8f7b\u6613\u5730\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\uff0c\u5982\u679cand<\/code>\u4f18\u5148\u7ea7\u8f83\u9ad8\uff0c\u90a3\u4e48\u6700\u7ec8\u7684\u8f93\u51fa\u7ed3\u679c\u5e94\u8be5\u4e3aTrue<\/code>\u6216\u8005False<\/code>\uff0c\u800c\u73b0\u5728\u7684\u8f93\u51fa\u7ed3\u679c\u662f\u4e00\u4e2a\u6570\u5b57\uff0c\u56e0\u6b64not<\/code>\u7684\u4f18\u5148\u7ea7\u9ad8\u4e8eand<\/code>\u3002
\u6700\u7ec8\u6211\u4eec\u9700\u8981\u786e\u8ba4\u6bd4\u8f83\u8fd0\u7b97\u7b26\u548cnot<\/code>\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u5173\u7cfb\uff0c\u5e76\u4ee5\u6b64\u6765\u786e\u5b9a\u51fa\u8fd9\u56db\u4e2a\u79cd\u7c7b\u8fd0\u7b97\u7684\u4f18\u5148\u7ea7\u987a\u5e8f\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n

class<\/span> Debug<\/span>:<\/span> def<\/span> mainProgram<\/span>(<\/span>self)<\/span>:<\/span> self.<\/span>x0 =<\/span> 0<\/span> self.<\/span>x1 =<\/span> 1<\/span> print<\/span>(<\/span>not<\/span> 0<\/span>)<\/span> # True<\/span> print<\/span>(<\/span>True<\/span> ><\/span> 1<\/span>)<\/span> # False<\/span> print<\/span>(<\/span>not<\/span> self.<\/span>x0 ><\/span> self.<\/span>x1)<\/span> # True<\/span> if<\/span> __name__ ==<\/span> \"__main__\"<\/span>:<\/span> main =<\/span> Debug(<\/span>)<\/span> main.<\/span>mainProgram(<\/span>)<\/span> <\/code><\/pre>\n

\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u5f53\u6211\u4eec\u6d4b\u8bd5True > 1<\/code>\u65f6\uff0c\u8f93\u51fa\u7684\u7ed3\u679c\u4e3aFalse<\/code>\uff0c\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u63a8\u65ad\uff0c\u6bd4\u8f83\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u5927\u4e8enot\u7b97\u7b26\u3002<\/strong> \u56e0\u4e3a\u5982\u679cnot<\/code>\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u8f83\u9ad8\uff0cnot self.x0<\/code>\u7684\u7ed3\u679c\u4e3aTrue<\/code>\uff0c\u800cTrue > 1<\/code>\u7684\u7ed3\u679c\u4e3aFalse<\/code>\uff0c\u4e0e\u6211\u4eec\u6700\u7ec8\u5f97\u5230\u7684True<\/code>\u7684\u7ed3\u679c\u4e0d\u7b26\u5408\uff0c\u5982\u679c\u6bd4\u8f83\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\u8f83\u9ad8\uff0c\u90a3\u4e48self.x0 > self.x1<\/code>\u7684\u7ed3\u679c\u4e3aFalse<\/code>\uff0cnot False<\/code>\u7684\u7ed3\u679c\u4e3aTrue<\/code>\uff0c\u5370\u8bc1\u4e86\u6211\u4eec\u4e4b\u524d\u7684\u63a8\u65ad\u3002
\u6b64\u5916\uff0c\u5bf9\u4e8e\u540c\u4e00\u79cd\u7c7b\u7684\u8fd0\u7b97\u7b26\uff0c\u8fd0\u7b97\u6b21\u5e8f\u670d\u4ece\u4ece\u5de6\u5230\u53f3\u7684\u6267\u884c\u987a\u5e8f\uff0c\u60f3\u8981\u66f4\u6539\u8fd0\u7b97\u6b21\u5e8f\u6dfb\u52a0\u5c0f\u62ec\u53f7\u5373\u53ef\u3002<\/strong>
\u5982\u679c\u5927\u5bb6\u89c9\u5f97\u6709\u7528\uff0c\u8bf7\u9ad8\u62ac\u8d35\u624b\u7ed9\u4e00\u4e2a\u8d5e\u8ba9\u6211\u4e0a\u63a8\u8350\u8ba9\u66f4\u591a\u7684\u4eba\u770b\u5230\u5427~<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"python\u903b\u8f91\u7b26\u53f7\u4f18\u5148\u7ea7_\u5de6\u79fb\u8fd0\u7b97\u7b26\u903b\u8f91\u8fd0\u7b97\u7b26\u4e2d\u6bd4\u8f83\u5e38\u89c1\u7684\u5c31\u662fand\uff0cor\uff0c\uff0c\uff0c\u4ee5\u53ca=\uff0c\u7406\u8bba\u4e0a\u6765\u8bf4\u6bd4\u8f83\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7andor","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/6159"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=6159"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/6159\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=6159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=6159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=6159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}