{"id":3120,"date":"2021-04-15T09:49:16","date_gmt":"2021-04-15T01:49:16","guid":{"rendered":"http:\/\/blog.ywdevops.cn\/?p=3120"},"modified":"2025-02-14T18:37:12","modified_gmt":"2025-02-14T10:37:12","slug":"python-14","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2021\/04\/15\/python-14\/","title":{"rendered":"Python\u8fd0\u7b97\u7b26"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">python\u8fd0\u7b97\u7b26\u4e3b\u8981\u5305\u62ec\u7b97\u672f\u8fd0\u7b97\u7b26\u3001\u8d4b\u503c\u8fd0\u7b97\u7b26\u3001\u6bd4\u8f83(\u5173\u7cfb)\u8fd0\u7b97\u7b26\uff0c\u903b\u8f91\u8fd0\u7b97\u7b26\u548c\u4f4d\u8fd0\u7b97\u7b26\uff0c\u4f7f\u7528\u8fd0\u7b97\u7b26\u5c06\u4e0d\u540c\u7c7b\u578b\u7684\u6570\u636e\u6309\u7167\u4e00\u5b9a\u7684\u89c4\u5219\u8fde\u63a5\u8d77\u6765\u7684\u5f0f\u5b50\u79f0\u4e3a\u8868\u8fbe\u5f0f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4e00\u3001\u7b97\u672f\u8fd0\u7b97\u7b26\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u7b97\u672f\u8fd0\u7b97\u7b26\u53f7\u662f\u5904\u7406\u56db\u5219\u8fd0\u7b97\u7684\u7b26\u53f7\uff0c\u5728\u6570\u5b57\u7684\u5904\u7406\u4e2d\u7528\u7684\u6700\u591a\uff0c\u5e38\u7528\u7684\u7b97\u672f\u8fd0\u7b97\u7b26\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">\u8fd0\u7b97\u7b26<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u8bf4\u660e<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5b9e\u4f8b<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u7ed3\u679c<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">+<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u52a0<\/td><td class=\"has-text-align-center\" data-align=\"center\">12.5+13<\/td><td class=\"has-text-align-center\" data-align=\"center\">25.5<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">&#8211;<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u51cf<\/td><td class=\"has-text-align-center\" data-align=\"center\">21-6<\/td><td class=\"has-text-align-center\" data-align=\"center\">15<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">*<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u4e58<\/td><td class=\"has-text-align-center\" data-align=\"center\">2*3.3<\/td><td class=\"has-text-align-center\" data-align=\"center\">6.6<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\/<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u9664<\/td><td class=\"has-text-align-center\" data-align=\"center\">6\/3<\/td><td class=\"has-text-align-center\" data-align=\"center\">2<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">%<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u6c42\u4f59(\u8fd4\u56de\u9664\u6cd5\u7684\u4f59\u6570)<\/td><td class=\"has-text-align-center\" data-align=\"center\">7%2<\/td><td class=\"has-text-align-center\" data-align=\"center\">1<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\/\/<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u53d6\u6574\u9664<\/td><td class=\"has-text-align-center\" data-align=\"center\">7\/\/2<\/td><td class=\"has-text-align-center\" data-align=\"center\">3<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">**<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5e42(\u8fd4\u56dex\u7684y\u6b21\u65b9)<\/td><td class=\"has-text-align-center\" data-align=\"center\">2**4<\/td><td class=\"has-text-align-center\" data-align=\"center\">16<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u6ce8\u610f\uff1a\u5728\u4f7f\u7528&#8221;%&#8221;\u6c42\u4f59\u7684\u65f6\u5019\uff0c\u5982\u679c\u9664\u6570(\u7b2c\u4e8c\u4e2a\u6570) \u662f\u8d1f\u6570\uff0c\u90a3\u4e48\u53d6\u5f97\u7684\u7ed3\u679c\u4e5f\u662f\u8d1f\u6570<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982\uff1a\u4e0b\u9762\u7684\u4f8b\u5b50\u5c55\u793a\u4e86\u7b97\u672f\u8fd0\u7b97\u7b26\u7684\u4f7f\u7528\uff0c\u5728IDLE\u4e2d\u65b0\u5efatest\u6587\u4ef6\uff0c\u8f93\u5165\u4ee3\u7801\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"524\" height=\"221\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/23.png\" alt=\"\" class=\"wp-image-3126\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/23.png 524w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/23-300x127.png 300w\" sizes=\"auto, (max-width: 524px) 100vw, 524px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u7f16\u5199\u5b8c\u6210\u540e\u6309f5\uff0c\u8fd0\u884cIDLE\u7f16\u8f91\u5668\uff0c\u5f97\u5230\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"535\" height=\"188\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/24.png\" alt=\"\" class=\"wp-image-3127\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/24.png 535w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/24-300x105.png 300w\" sizes=\"auto, (max-width: 535px) 100vw, 535px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001\u7b97\u672f\u8fd0\u7b97\u7b26\u4e5f\u53ef\u4ee5\u5bf9\u53d8\u91cf\u8fdb\u884c\u8fd0\u7b97\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"537\" height=\"220\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/25.png\" alt=\"\" class=\"wp-image-3129\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/25.png 537w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/25-300x123.png 300w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6309f5\u8fd0\u884c\u540e\u7684\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"526\" height=\"194\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/26.png\" alt=\"\" class=\"wp-image-3130\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/26.png 526w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/26-300x111.png 300w\" sizes=\"auto, (max-width: 526px) 100vw, 526px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001python\u4e2d\u7684\u7b97\u672f\u8fd0\u7b97\u7b26\u4f18\u5148\u7ea7\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7b2c\u4e00\u7ea7\uff1a**<\/li>\n\n\n\n<li>\u7b2c\u4e8c\u7ea7\uff1a*\uff0c\/\uff0c%\uff0c\/\/<\/li>\n\n\n\n<li>\u7b2c\u4e09\u7ea7\uff1a+\uff0c-<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u540c\u6837\u9075\u5faa\u5148\u4e58\u9664\u540e\u52a0\u51cf\uff0c\u540c\u7ea7\u8fd0\u7b97\u7b26\u4ece\u5de6\u5230\u53f3\u8ba1\u7b97\uff0c\u53ef\u4ee5\u4f7f\u7528\u5c0f\u62ec\u53f7()\u8c03\u6574\u8ba1\u7b97\u7684\u4f18\u5148\u7ea7<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4\u3001\u5728python\u4e2d\uff0c\u8fd0\u7b97\u7b26&#8221; * &#8221; \u8fd8\u53ef\u4ee5\u7528\u4e8e\u5b57\u7b26\u4e32\u4e2d\uff0c\u8ba1\u7b97\u7ed3\u679c\u5c31\u662f\u5b57\u7b26\u4e32\u91cd\u590d\u6307\u5b9a\u6b21\u6570\u7684\u7ed3\u679c\uff0c\u4f8b\u5982\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"531\" height=\"162\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/27.png\" alt=\"\" class=\"wp-image-3132\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/27.png 531w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/27-300x92.png 300w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u7801\u6267\u884c\u7684\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"518\" height=\"120\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/28.png\" alt=\"\" class=\"wp-image-3133\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/28.png 518w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/28-300x69.png 300w\" sizes=\"auto, (max-width: 518px) 100vw, 518px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u6ce8\u610f\uff1a\u5728\u4f7f\u7528\u9664\u6cd5(\/\u548c\/\/)\u8fd0\u7b97\u7b26\u548c\u6c42\u4f59\u8fd0\u7b97\u7b26\u7684\u65f6\u5019\uff0c\u9664\u6570\u4e0d\u80fd\u4e3a0\uff0c\u5426\u5219\u5c06\u4f1a\u629b\u51fa\u5f02\u5e38<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u57fa\u672c\u8fd0\u7b97\u7b26\u4f18\u5148\u7ea7\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"656\" height=\"182\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2025\/02\/wechat_2025-02-14_183542_346.png\" alt=\"\" class=\"wp-image-17849\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2025\/02\/wechat_2025-02-14_183542_346.png 656w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2025\/02\/wechat_2025-02-14_183542_346-300x83.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2025\/02\/wechat_2025-02-14_183542_346-600x166.png 600w\" sizes=\"auto, (max-width: 656px) 100vw, 656px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4e8c\u3001\u4f4d\u8fd0\u7b97\u7b26\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f4d\u8fd0\u7b97\u7b26\u662f\u628a\u6570\u5b57\u770b\u505a\u4e8c\u8fdb\u5236\u6570\u6765\u8fdb\u884c\u8ba1\u7b97\u7684\uff0c\u56e0\u6b64\uff0c\u9700\u8981\u5148\u5c06\u6267\u884c\u8fd0\u7b97\u7684\u6570\u636e\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u7136\u540e\u624d\u80fd\u6267\u884c\u8fd0\u7b97\uff0cPython\u4e2d\u7684\u4f4d\u8fd0\u7b97\u7b26\u6709\u4f4d\u4e0e(&amp;)\u3001\u4f4d\u6216(|)\u3001\u4f4d\u5f02\u6216(^)\u3001\u53d6\u53cd(~)\u3001\u5de6\u79fb\u4f4d(&lt;&lt;)\u3001\u53f3\u79fb\u4f4d(&gt;&gt;)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001&#8221;\u4f4d\u4e0e&#8221; \u8fd0\u7b97<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd0\u7b97\u7b26\u53f7\u4e3a&#8221;&amp;&#8221;\uff0c\u8fd0\u7b97\u6cd5\u5219\u662f\uff1a\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u4e8c\u8fdb\u5236\u8868\u793a\uff0c\u53ea\u6709\u5bf9\u5e94\u4f4d\u7f6e\u90fd\u662f1\uff0c\u7ed3\u679c\u624d\u662f1\uff0c\u5426\u5219\u4e3a0\uff0c\u5982\u679c\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u7cbe\u5ea6\u4e0d\u540c\uff0c\u90a3\u4e48\u7ed3\u679c\u7684\u7cbe\u5ea6\u4e0e\u7cbe\u5ea6\u9ad8\u7684\u64cd\u4f5c\u6570\u76f8\u540c\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"519\" height=\"236\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/33.png\" alt=\"\" class=\"wp-image-3135\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/33.png 519w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/33-300x136.png 300w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u7801\u6267\u884c\u7684\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"505\" height=\"122\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/34.png\" alt=\"\" class=\"wp-image-3136\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/34.png 505w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/34-300x72.png 300w\" sizes=\"auto, (max-width: 505px) 100vw, 505px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u8ff0\u64cd\u4f5c\u7684\u5185\u90e8\u4e8c\u8fdb\u5236\u5b9e\u73b0\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"521\" height=\"139\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/35.png\" alt=\"\" class=\"wp-image-3137\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/35.png 521w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/35-300x80.png 300w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u4ece\u4e0a\u56fe\u4e2d\u53ef\u4ee5\u770b\u51fa\uff0c\u53ea\u6709\u5bf9\u5e94\u4f4d\u7f6e\u90fd\u662f1\u7684\u65f6\u5019\uff0c\u7ed3\u679c\u4f4d\u624d\u662f\uff0c\u5426\u5219\u4e3a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001&#8221;\u4f4d\u6216&#8221; \u8fd0\u7b97<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8220;\u4f4d\u6216&#8221; \u8fd0\u7b97\u7b26\u4e3a&#8221;|&#8221; \uff0c\u8fd0\u7b97\u6cd5\u5219\u662f\uff1a\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u4e8c\u8fdb\u5236\u8868\u793a\uff0c\u53ea\u6709\u5bf9\u5e94\u4f4d\u7f6e\u90fd\u662f0\uff0c\u7ed3\u679c\u624d\u662f0\uff0c\u5426\u5219\u4f4d\u7f6e1\uff0c\u5982\u679c\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u7cbe\u5ea6\u4e0d\u540c\uff0c\u5219\u7ed3\u679c\u7684\u7cbe\u5ea6\u4e0e\u7cbe\u5ea6\u9ad8\u7684\u6570\u76f8\u540c\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"544\" height=\"297\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/1-7.png\" alt=\"\" class=\"wp-image-3146\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/1-7.png 544w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/1-7-300x164.png 300w\" sizes=\"auto, (max-width: 544px) 100vw, 544px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u7801\u6267\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"503\" height=\"135\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/37.png\" alt=\"\" class=\"wp-image-3140\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/37.png 503w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/37-300x81.png 300w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u4ece\u4e0a\u56fe\u4e2d\u53ef\u4ee5\u770b\u51fa\uff0c\u5bf9\u5e94\u4f4d\u7f6e\u53ea\u8981\u51fa\u73b0\u4e00\u4e2a1\uff0c\u7ed3\u679c\u5373\u4e3a1\uff0c\u53ea\u6709\u90fd\u662f0\uff0c\u7ed3\u679c\u624d\u662f0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001&#8221;\u4f4d\u5f02\u6216&#8221; \u8fd0\u7b97<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8220;\u4f4d\u5f02\u6216&#8221; \u8fd0\u7b97\u7684\u8fd0\u7b97\u7b26\u662f&#8221; ^ &#8221; ,\u8fd0\u7b97\u6cd5\u5219\u662f\uff1a\u5f53\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u4e8c\u8fdb\u5236\u8868\u793a\u76f8\u540c(\u540c\u4e3a0\u6216\u8005\u540c\u4e3a1) \u65f6\uff0c\u7ed3\u679c\u4e3a0\uff0c\u5426\u5219\u4e3a1\u3002\u5982\u679c\u4e24\u4e2a\u6570\u7684\u7cbe\u5ea6\u4e0d\u540c\uff0c\u5219\u7ed3\u679c\u7684\u7cbe\u5ea6\u4e0e\u7cbe\u5ea6\u9ad8\u7684\u64cd\u4f5c\u6570\u76f8\u540c\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"522\" height=\"293\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/38.png\" alt=\"\" class=\"wp-image-3143\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/38.png 522w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/38-300x168.png 300w\" sizes=\"auto, (max-width: 522px) 100vw, 522px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u7801\u6267\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"526\" height=\"137\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/39.png\" alt=\"\" class=\"wp-image-3144\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/39.png 526w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/39-300x78.png 300w\" sizes=\"auto, (max-width: 526px) 100vw, 526px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u4ece\u4e0a\u56fe\u4e2d\u53ef\u4ee5\u770b\u51fa\uff0c\u53ea\u8981\u5bf9\u5e94\u4f4d\u7f6e\u90fd\u662f0\u6216\u80051\u7684\u65f6\u5019\uff0c\u7ed3\u679c\u624d\u4e3a0\uff0c\u5426\u5219\u4e3a1<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4\u3001&#8221;\u4f4d\u53d6\u53cd&#8221; \u8fd0\u7b97<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8220;\u4f4d\u53d6\u53cd&#8221; \u8fd0\u7b97\u4e5f\u79f0\u4e3a&#8221;\u4f4d\u975e&#8221;\u8fd0\u7b97\uff0c\u8fd0\u7b97\u7b26\u4e3a&#8221;~&#8221; \uff0c\u8fd0\u7b97\u6cd5\u5219\u5c31\u662f\u5c06\u64cd\u4f5c\u6570\u4e2d\u5bf9\u5e94\u7684\u4e8c\u8fdb\u5236\u65701\u4fee\u6539\u4e3a0\uff0c0\u4fee\u6539\u4e3a1\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"185\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/33-1.png\" alt=\"\" class=\"wp-image-3149\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/33-1.png 512w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/33-1-300x108.png 300w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u7801\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"482\" height=\"116\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/34-1.png\" alt=\"\" class=\"wp-image-3150\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/34-1.png 482w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/34-1-300x72.png 300w\" sizes=\"auto, (max-width: 482px) 100vw, 482px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u4e0a\u9762\u7684\u7ed3\u679c\u53ef\u4ee5\u770b\u51fa\uff0c4\u7684\u4f4d\u53d6\u53cd\u7ed3\u679c\u4e3a-5\uff0c\u90a3\u4e48\u4e3a\u4ec0\u4e48\u4f1a\u662f-5\u5462\uff0c\u539f\u7406\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f4d\u53d6\u53cd\u8fd0\u7b97\u9700\u8981\u5c06\u6570\u5b57\u8f6c\u6362\u6210\u4e8c\u8fdb\u5236\uff0c\u7136\u540e\u5728\u8fdb\u884c\u8fd0\u7b97\uff0c\u4e8c\u8fdb\u5236\u5728\u5185\u5b58\u4e2d\u662f\u4ee5\u8865\u7801\u65b9\u5f0f\u5b58\u50a8\uff0c\u8865\u7801\u5c5e\u4e8e\u8ba1\u7b97\u673a\u4e09\u79cd\u673a\u68b0\u6570\u7684\u4e00\u79cd\uff0c\u673a\u68b0\u6570\u5206\u4e3a\u539f\u7801\u3001\u53cd\u7801\u3001\u8865\u7801<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u662f\u6b63\u6570\uff1a\u539f\u7801=\u53cd\u7801=\u8865\u7801\uff0c\u6b63\u6570\u7684\u7b26\u53f7\u4f4d\u4e3a0(0 1001 \u6700\u524d\u9762\u76840\u8868\u793a\u7b26\u53f7\u4f4d)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u662f\u8d1f\u6570\uff1a\u53cd\u7801\u5c31\u662f\u5c06\u539f\u7801\u7684\u6bcf\u4e00\u4f4d\u53d6\u53cd(\u7b26\u53f7\u4f4d\u4e0d\u52a8)\uff0c\u53730\u53d8\u62101,1\u53d8\u62100\uff0c\u8865\u7801\u5c31\u662f\u5728\u53cd\u7801\u7684\u57fa\u7840\u4e0a\u672b\u4f4d+1\uff0c\u8d1f\u6570\u7684\u7b26\u53f7\u4f4d\u4e3a1<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6d41\u7a0b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9996\u5148\u5c06\u5341\u8fdb\u5236\u6570\u5b574\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\uff0c\u8f6c\u6362\u540e\u7684\u503c\u4e3a100\uff0c\u5982\u679c\u7528\u56db\u4f4d\u6765\u8868\u793a\u5c31\u662f0100\uff0c\u5176\u4e2d\u6700\u524d\u9762\u76840\u8868\u793a\u7b26\u53f7\u4f4d\uff0c\u6b63\u6570\u4e3a0\uff0c\u8d1f\u6570\u4e3a1<\/li>\n\n\n\n<li>\u7531\u4e8e\u4e8c\u8fdb\u5236\u5728\u5185\u5b58\u4e2d\u662f\u4ee5\u8865\u7801\u7684\u5f62\u5f0f\u5b58\u5728\uff0c\u56e0\u6b64\u9700\u8981\u5148\u5c06\u6b64\u4e8c\u8fdb\u5236\u8f6c\u6362\u4e3a\u8865\u7801\uff0c\u8981\u8f6c\u6210\u8865\u7801\u5148\u5c06\u539f\u7801\u8f6c\u6210\u53cd\u7801\uff0c\u518d\u5c06\u53cd\u7801\u8f6c\u6210\u8865\u7801\uff0c\u6b63\u6570\u7684\u4e8c\u8fdb\u5236\u539f\u7801\u53cd\u7801\u548c\u8865\u7801\u90fd\u662f\u4e00\u6837\u7684\uff0c\u56e0\u6b64\u90fd\u662f0100<\/li>\n\n\n\n<li>\u5c06\u4e0a\u9762\u7684\u5f97\u5230\u7684\u8865\u7801\uff0c\u6309\u4f4d\u53d6\u53cd\uff0c\u5373\u4e3a\u6240\u6709\u4f4d\u7f6e0\u53d8\u62101,1\u53d8\u62100\uff0c\u5f97\u5230\u7684\u7ed3\u679c\u4e3a1011(\u53d6\u53cd\u540e\u7684\u539f\u7801)<\/li>\n\n\n\n<li>\u5c06\u6b64\u539f\u7801\u8f6c\u6362\u4e3a\u53cd\u7801\uff0c\u5373\u4fdd\u6301\u7b26\u53f7\u4f4d\u4e0d\u53d8\uff0c\u5176\u4f59\u76840\u53d8\u62101,1\u53d8\u62100 \uff0c\u5f97\u5230\u7ed3\u679c\u4e3a1100<\/li>\n\n\n\n<li>\u6700\u540e\u5c06\u6309\u7167\u8d1f\u6570\u7684\u8f6c\u7801\u89c4\u5219\uff0c\u5c06\u6b64\u53cd\u7801\u8f6c\u6362\u4f4d\u8865\u7801\uff0c\u5728\u53cd\u7801\u7684\u672b\u4f4d+1\u5f97\u5230\u8865\u7801\uff0c\u5f97\u5230\u7ed3\u679c\u4e3a1101(\u5185\u90e8\u4e3a\u4e8c\u8fdb\u5236\u52a0\u6cd51100+0001)<\/li>\n\n\n\n<li>\u5c06\u4e0a\u9762\u8f6c\u6362\u5f97\u5230\u7684\u8865\u78011101\u8f6c\u4e3a10\u8fdb\u5236\u5c31\u662f-5(\u6700\u524d\u9762\u76841\u4e3a\u7b26\u53f7\u4f4d\u8868\u793a\u8d1f\u6570\uff0c\u540e\u9762\u7684101\u8f6c\u4e3a\u5341\u8fdb\u5236\u4e3a5)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">5\u3001\u5de6\u79fb\u4f4d\u8fd0\u7b97\u7b26\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5de6\u79fb\u4f4d\u8fd0\u7b97\u7b26\u7528\u7b26\u53f7&#8221;&lt;&lt;&#8220;\u8868\u793a\uff0c\u8fd0\u7b97\u6cd5\u5219\u662f\u5c06\u4e00\u4e2a\u4e8c\u8fdb\u5236\u64cd\u4f5c\u6570\u5411\u5de6\u79fb\u52a8\u6307\u5b9a\u7684\u4f4d\u6570\uff0c\u5de6\u8fb9(\u9ad8\u4f4d\u7aef)\u6ea2\u51fa\u7684\u4f4d\u88ab\u4e22\u5f03\uff0c\u53f3\u8fb9(\u4f4e\u4f4d\u7aef)\u7684\u7a7a\u4f4d\u75280\u8865\u9f50\uff0c\u5de6\u79fb\u4f4d\u8fd0\u7b97\u76f8\u5f53\u4e8e\u4e58\u4ee52\u7684n\u6b21\u5e42\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"510\" height=\"172\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/38-1.png\" alt=\"\" class=\"wp-image-3155\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/38-1.png 510w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/38-1-300x101.png 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u7801\u6267\u884c\u7684\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"505\" height=\"148\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/39-1.png\" alt=\"\" class=\"wp-image-3156\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/39-1.png 505w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/39-1-300x88.png 300w\" sizes=\"auto, (max-width: 505px) 100vw, 505px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u4ece\u4e0a\u56fe\u4e2d\u53ef\u770b\u51fa\uff0c\u5de6\u79fb\u4f4d\u76f8\u5f53\u4e8e\u521d\u59cb\u503c*2\u7684n\u6b21\u5e42\uff0c\u53f3\u79fb\u4f4d\u76f8\u5f53\u4e8e\u521d\u59cb\u503c\u9664\u4ee52\u7684n\u6b21\u5e42<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f4d\u8fd0\u7b97\u7b26\u56fe\u8c31\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1003\" height=\"584\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/35-1.png\" alt=\"\" class=\"wp-image-3157\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/35-1.png 1003w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/35-1-300x175.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/35-1-768x447.png 768w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/35-1-600x349.png 600w\" sizes=\"auto, (max-width: 1003px) 100vw, 1003px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd0\u7b97\u7b26\u7684\u4f18\u5148\u7ea7\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"541\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/32.png\" alt=\"\" class=\"wp-image-3123\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/32.png 975w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/32-300x166.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/32-768x426.png 768w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/32-600x333.png 600w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4e09\u3001\u8d4b\u503c\u8fd0\u7b97\u7b26\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8d4b\u503c\u8fd0\u7b97\u7b26\u4e3b\u8981\u7528\u6765\u7ed9\u53d8\u91cf\u8d4b\u503c\uff0c\u4f7f\u7528\u65f6\uff0c\u53ef\u4ee5\u76f4\u63a5\u5c06\u57fa\u672c\u8d4b\u503c\u8fd0\u7b97\u7b26&#8221;=&#8221;\u53f3\u8fb9\u7684\u503c\u8d4b\u7ed9\u5de6\u8fb9\u7684\u53d8\u91cf\uff0c\u4e5f\u53ef\u4ee5\u8fdb\u884c\u67d0\u4e9b\u8fd0\u7b97\u540e\u518d\u8d4b\u503c\u7ed9\u6628\u5929\u7684\u53d8\u91cf\uff0cpython\u4e2d\u5e38\u7528\u7684\u8d4b\u503c\u8fd0\u7b97\u7b26\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">\u8fd0\u7b97\u7b26<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u8bf4\u660e<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u4f8b\u5b50<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5c55\u5f00\u5f62\u5f0f<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">=<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u7b80\u5355\u7684\u8d4b\u503c\u8fd0\u7b97<\/td><td class=\"has-text-align-center\" data-align=\"center\">x=y<\/td><td class=\"has-text-align-center\" data-align=\"center\">x=y<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">+=<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u52a0\u8d4b\u503c<\/td><td class=\"has-text-align-center\" data-align=\"center\">x+=y<\/td><td class=\"has-text-align-center\" data-align=\"center\">x=x+y<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">-=<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u51cf\u8d4b\u503c<\/td><td class=\"has-text-align-center\" data-align=\"center\">x-=y<\/td><td class=\"has-text-align-center\" data-align=\"center\">x=x-y<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">*=<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u4e58\u8d4b\u503c<\/td><td class=\"has-text-align-center\" data-align=\"center\">x*=y<\/td><td class=\"has-text-align-center\" data-align=\"center\">x=x*y<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\/=<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u9664\u8d4b\u503c<\/td><td class=\"has-text-align-center\" data-align=\"center\">x\/=y<\/td><td class=\"has-text-align-center\" data-align=\"center\">x=x\/y<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">%=<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u53d6\u4f59\u6570\u8d4b\u503c<\/td><td class=\"has-text-align-center\" data-align=\"center\">x%=y<\/td><td class=\"has-text-align-center\" data-align=\"center\">x=x%y<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">**=<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5e42\u8d4b\u503c<\/td><td class=\"has-text-align-center\" data-align=\"center\">x**=y<\/td><td class=\"has-text-align-center\" data-align=\"center\">x=x**y<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\/\/=<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u53d6\u6574\u6570\u8d4b\u503c<\/td><td class=\"has-text-align-center\" data-align=\"center\">x\/\/=y<\/td><td class=\"has-text-align-center\" data-align=\"center\">x=x\/\/y<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u6ce8\u610f\uff1a&#8221;=&#8221; \u548c&#8221;==&#8221; \u662f\u7f16\u7a0b\u4e2d\u5e38\u89c1\u7684\u9519\u8bef\uff0c\u5176\u4e2d&#8221;=&#8221; \u8868\u793a\u8d4b\u503c\u8fd0\u7b97\u7b26\uff0c&#8221;==&#8221; \u8868\u793a\u6bd4\u8f83\u8fd0\u7b97\u7b26<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"585\" height=\"303\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/9-1.png\" alt=\"\" class=\"wp-image-3667\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/9-1.png 585w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/9-1-300x155.png 300w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"551\" height=\"158\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/10-1.png\" alt=\"\" class=\"wp-image-3669\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/10-1.png 551w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/10-1-300x86.png 300w\" sizes=\"auto, (max-width: 551px) 100vw, 551px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u56db\u3001\u6bd4\u8f83\u8fd0\u7b97\u7b26\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6bd4\u8f83\u8fd0\u7b97\u7b26\uff0c\u4e5f\u79f0\u4e3a\u5173\u7cfb\u8fd0\u7b97\u7b26\uff0c\u7528\u4e8e\u5bf9\u53d8\u91cf\u6216\u8005\u8868\u8fbe\u5f0f\u7684\u7ed3\u679c\u8fdb\u884c\u5927\u5c0f\u3001\u771f\u5047\u7b49\u6bd4\u8f83\uff0c\u5982\u679c\u6bd4\u8f83\u7ed3\u679c\u4e3a\u771f\uff0c\u8fd4\u56deTrue\uff0c\u5982\u679c\u8fd4\u56de\u7ed3\u679c\u4e3a\u5047\uff0c\u8fd4\u56deFalse\uff0c\u6bd4\u8f83\u8fd0\u7b97\u7b26\u901a\u5e38\u7528\u5728\u6761\u4ef6\u8bed\u53e5\u4e2d\u4f5c\u4e3a\u5224\u65ad\u7684\u4f9d\u636e\uff0c\u5e38\u7528\u7684\u6bd4\u8f83\u8fd0\u7b97\u7b26\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">\u8fd0\u7b97\u7b26<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u4f5c\u7528<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u4e3e\u4f8b<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u7ed3\u679c<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">&gt;<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5927\u4e8e<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8220;a&#8221; &gt; &#8220;b&#8221;<\/td><td class=\"has-text-align-center\" data-align=\"center\">False<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">&lt;<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5c0f\u4e8e<\/td><td class=\"has-text-align-center\" data-align=\"center\">130 &lt; 100<\/td><td class=\"has-text-align-center\" data-align=\"center\">True<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">==<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u7b49\u4e8e<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8220;c&#8221; == &#8220;c&#8221;<\/td><td class=\"has-text-align-center\" data-align=\"center\">True<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">!=<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u4e0d\u7b49\u4e8e<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8220;a&#8221; != &#8220;b&#8221;<\/td><td class=\"has-text-align-center\" data-align=\"center\">True<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">&gt;=<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5927\u4e8e\u6216\u7b49\u4e8e<\/td><td class=\"has-text-align-center\" data-align=\"center\">400 &gt;= 200<\/td><td class=\"has-text-align-center\" data-align=\"center\">True<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">&lt;=<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u5c0f\u4e8e\u6216\u7b49\u4e8e<\/td><td class=\"has-text-align-center\" data-align=\"center\">300 &lt;= 100<\/td><td class=\"has-text-align-center\" data-align=\"center\">False<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ce8\u610f\uff1a\u5728python\u4e2d\uff0c\u5f53\u9700\u8981\u5224\u65ad\u4e00\u4e2a\u53d8\u91cf\u662f\u5426\u4ecb\u4e8e\u4e24\u4e2a\u503c\u4e4b\u95f4\u7684\u65f6\u5019\uff0c\u53ef\u4ee5\u91c7\u7528\u94fe\u5f0f\u6bd4\u8f83 &#8220;\u503c1&#8221; &lt; \u53d8\u91cf &lt; &#8220;\u503c2&#8221; \u7684\u5f62\u5f0f\uff0c\u5982\uff1a100 &lt; a &lt;200<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u7684\u4f8b\u5b50\u8bf4\u660e\u6bd4\u8f83\u8fd0\u7b97\u7b26\u7684\u7528\u6cd5\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"545\" height=\"257\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/11-1.png\" alt=\"\" class=\"wp-image-3671\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/11-1.png 545w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/11-1-300x141.png 300w\" sizes=\"auto, (max-width: 545px) 100vw, 545px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u7801\u6267\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"569\" height=\"211\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/12-1.png\" alt=\"\" class=\"wp-image-3672\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/12-1.png 569w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/12-1-300x111.png 300w\" sizes=\"auto, (max-width: 569px) 100vw, 569px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4e94\u3001\u903b\u8f91\u8fd0\u7b97\u7b26\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u903b\u8f91\u8fd0\u7b97\u7b26\u662f\u5bf9\u771f\u548c\u5047\u4e24\u79cd\u5e03\u5c14\u503c\u8fdb\u884c\u8fd0\u7b97\uff0c\u8fd0\u7b97\u540e\u7684\u7ed3\u679c\u4ecd\u662f\u4e00\u4e2a\u5e03\u5c14\u503c\uff0cpython\u4e2d\u7684\u903b\u8f91\u8fd0\u7b97\u7b26\u4e3b\u8981\u5305\u62ecand(\u903b\u8f91\u4e0e)\u3001or(\u903b\u8f91\u6216)\u3001not(\u903b\u8f91\u975e)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u8868\u8bf4\u660e\u4e86\u903b\u8f91\u8fd0\u7b97\u7b26\u7684\u7528\u6cd5\u548c\u8bf4\u660e\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">\u8fd0\u7b97\u7b26<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u542b\u4e49<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u7528\u6cd5<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u65b9\u5411<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">and<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u903b\u8f91\u4e0e<\/td><td class=\"has-text-align-center\" data-align=\"center\">a and b<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u4ece\u5de6\u5230\u53f3<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">or<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u903b\u8f91\u6216<\/td><td class=\"has-text-align-center\" data-align=\"center\">a or b<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u4ece\u5de6\u5230\u53f3<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">not<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u903b\u8f91\u975e<\/td><td class=\"has-text-align-center\" data-align=\"center\">not a<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u4ece\u53f3\u5230\u5de6<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u903b\u8f91\u8fd0\u7b97\u7684\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">\u8868\u8fbe\u5f0f1<\/td><td>\u8868\u8fbe\u5f0f2<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u8868\u8fbe\u5f0f1 and \u8868\u8fbe\u5f0f2<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u8868\u8fbe\u5f0f1 or \u8868\u8fbe\u5f0f2<\/td><td class=\"has-text-align-center\" data-align=\"center\">not \u8868\u8fbe\u5f0f1<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">True<\/td><td>True<\/td><td class=\"has-text-align-center\" data-align=\"center\"> True <\/td><td class=\"has-text-align-center\" data-align=\"center\"> True <\/td><td class=\"has-text-align-center\" data-align=\"center\">False<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"> True <\/td><td> False <\/td><td class=\"has-text-align-center\" data-align=\"center\"> False <\/td><td class=\"has-text-align-center\" data-align=\"center\"> True <\/td><td class=\"has-text-align-center\" data-align=\"center\"> False <\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"> False  <\/td><td> False  <\/td><td class=\"has-text-align-center\" data-align=\"center\"> False  <\/td><td class=\"has-text-align-center\" data-align=\"center\"> False  <\/td><td class=\"has-text-align-center\" data-align=\"center\">  True  <\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\"> False  <\/td><td> True  <\/td><td class=\"has-text-align-center\" data-align=\"center\">  False  <\/td><td class=\"has-text-align-center\" data-align=\"center\"> True  <\/td><td class=\"has-text-align-center\" data-align=\"center\"> True  <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u4f8b\u5b50\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528\u903b\u8f91\u8fd0\u7b97\u7b26\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"693\" height=\"268\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/13-1.png\" alt=\"\" class=\"wp-image-3677\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/13-1.png 693w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/13-1-300x116.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/13-1-600x232.png 600w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u56fe\u4e2d\uff0c\u9996\u5148\u5b9a\u4e49\u4e86\u661f\u671f\u548c\u65f6\u95f4\u90fd\u662f\u901a\u8fc7\u952e\u76d8\u8f93\u5165\u7684\u65b9\u5f0f\uff0c\u7136\u540e\u901a\u8fc7if\u8bed\u53e5\u8fdb\u884c\u5224\u65ad\uff0c\u5f53\u661f\u671f\u7b49\u4e8e\u661f\u671f\u4e00\u5e76\u4e14\u65f6\u95f4\u572810\u70b9\u523017\u70b9\u6216\u8005\u661f\u671f\u4e8c\u65f6\u95f4\u572813\u70b9\u523017\u70b9\u4e4b\u95f4\u8868\u793a\u6d3b\u52a8\u8fdb\u884c\u4e2d\uff0c\u5426\u5219\u6d3b\u52a8\u7ed3\u675f\uff0c\u6ce8\u610fif\u8bed\u53e5\u6700\u540e\u7684\u6362\u884c\u7b26\u53f7&#8221;\\&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee3\u7801\u6267\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"546\" height=\"199\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/14-1.png\" alt=\"\" class=\"wp-image-3679\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/14-1.png 546w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/04\/14-1-300x109.png 300w\" sizes=\"auto, (max-width: 546px) 100vw, 546px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>python\u8fd0\u7b97\u7b26\u4e3b\u8981\u5305\u62ec\u7b97\u672f\u8fd0\u7b97\u7b26\u3001\u8d4b\u503c\u8fd0\u7b97\u7b26\u3001\u6bd4\u8f83(\u5173\u7cfb)\u8fd0\u7b97\u7b26\uff0c\u903b\u8f91\u8fd0\u7b97\u7b26\u548c\u4f4d\u8fd0\u7b97\u7b26\uff0c\u4f7f\u7528\u8fd0\u7b97\u7b26\u5c06\u4e0d\u540c\u7c7b [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":3664,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,29],"tags":[],"class_list":["post-3120","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-yunwei"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/3120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=3120"}],"version-history":[{"count":26,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/3120\/revisions"}],"predecessor-version":[{"id":17850,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/3120\/revisions\/17850"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/3664"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=3120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=3120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=3120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}