{"id":565,"date":"2024-12-26T23:12:36","date_gmt":"2024-12-26T15:12:36","guid":{"rendered":"https:\/\/www.laixuexila.com\/?p=565"},"modified":"2024-12-26T23:12:36","modified_gmt":"2024-12-26T15:12:36","slug":"%e5%9c%a8-python-%e4%b8%ad%ef%bc%8c-%e5%92%8c-is%e7%9a%84%e5%8c%ba%e5%88%ab%e6%98%af%e4%bb%80%e4%b9%88%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.laixuexila.com\/index.php\/2024\/12\/26\/%e5%9c%a8-python-%e4%b8%ad%ef%bc%8c-%e5%92%8c-is%e7%9a%84%e5%8c%ba%e5%88%ab%e6%98%af%e4%bb%80%e4%b9%88%ef%bc%9f\/","title":{"rendered":"\u5728 Python \u4e2d\uff0c==\u00a0\u548c\u00a0is\u7684\u533a\u522b\u662f\u4ec0\u4e48\uff1f"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u5728 Python \u4e2d\uff0c<code>==<\/code> \u548c <code>is<\/code> \u90fd\u53ef\u4ee5\u7528\u4e8e\u6bd4\u8f83\u5bf9\u8c61\uff0c\u4f46\u5b83\u4eec\u7684\u884c\u4e3a\u548c\u7528\u9014\u4e0d\u540c\u3002\u4e86\u89e3\u5b83\u4eec\u4e4b\u95f4\u7684\u533a\u522b\u5bf9\u4e8e\u907f\u514d\u9519\u8bef\u548c\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u975e\u5e38\u91cd\u8981\u3002<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong><code>==<\/code> \u64cd\u4f5c\u7b26\uff1a\u503c\u6bd4\u8f83<\/strong><\/h3>\n\n\n\n<p><code>==<\/code> \u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u5bf9\u8c61\u7684 <strong>\u503c<\/strong> \u662f\u5426\u76f8\u7b49\u3002\u8fd9\u610f\u5473\u7740\u5982\u679c\u4e24\u4e2a\u5bf9\u8c61\u5177\u6709\u76f8\u540c\u7684\u5185\u5bb9\uff08\u6216\u503c\uff09\uff0c<code>==<\/code> \u4f1a\u8fd4\u56de <code>True<\/code>\uff0c\u65e0\u8bba\u5b83\u4eec\u662f\u5426\u662f\u540c\u4e00\u4e2a\u5bf9\u8c61\uff08\u5373\u5185\u5b58\u4f4d\u7f6e\u662f\u5426\u76f8\u540c\uff09\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u793a\u4f8b\uff1a<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>a = \"hello\"\nb = \"hello\"\nprint(a == b)  # True\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u503c\u76f8\u7b49<\/code><\/pre>\n\n\n\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>a == b<\/code> \u8fd4\u56de <code>True<\/code>\uff0c\u56e0\u4e3a\u5b57\u7b26\u4e32 <code>\"hello\"<\/code> \u7684\u503c\u5728\u4e24\u4e2a\u53d8\u91cf\u4e2d\u662f\u76f8\u540c\u7684\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong><code>is<\/code> \u64cd\u4f5c\u7b26\uff1a\u8eab\u4efd\u6bd4\u8f83<\/strong><\/h3>\n\n\n\n<p><code>is<\/code> \u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u5bf9\u8c61\u7684 <strong>\u8eab\u4efd<\/strong> \u662f\u5426\u76f8\u540c\uff0c\u5373\u5b83\u4eec\u662f\u5426\u5f15\u7528\u540c\u4e00\u4e2a\u5185\u5b58\u5730\u5740\uff0c\u6216\u8005\u8bf4\u5b83\u4eec\u662f\u5426\u662f\u540c\u4e00\u4e2a\u5bf9\u8c61\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c<code>is<\/code> \u5224\u65ad\u7684\u662f\u4e24\u4e2a\u5bf9\u8c61\u662f\u5426\u662f\u540c\u4e00\u4e2a\u5b9e\u4f8b\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u793a\u4f8b\uff1a<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>a = \"hello\"\nb = \"hello\"\nprint(a is b)  # True\uff0cPython \u4e2d\u7684\u5b57\u7b26\u4e32\u662f\u4e0d\u53ef\u53d8\u7684\uff0c\u901a\u5e38\u4f1a\u91cd\u7528\u76f8\u540c\u7684\u5b57\u7b26\u4e32\u5b57\u9762\u503c<\/code><\/pre>\n\n\n\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>a is b<\/code> \u8fd4\u56de <code>True<\/code>\uff0c\u56e0\u4e3a Python \u4f1a\u5bf9\u5e38\u91cf\u5b57\u7b26\u4e32\u8fdb\u884c\u4f18\u5316\uff08\u79f0\u4e3a\u201c\u9a7b\u7559\u201d\uff09\uff0c\u5373\u5bf9\u4e8e\u76f8\u540c\u7684\u5b57\u7b26\u4e32\u5b57\u9762\u91cf\uff0cPython \u4f1a\u5c06\u5b83\u4eec\u5b58\u50a8\u5728\u76f8\u540c\u7684\u5185\u5b58\u4f4d\u7f6e\u3002\u56e0\u6b64\uff0c<code>a<\/code> \u548c <code>b<\/code> \u5f15\u7528\u7684\u662f\u540c\u4e00\u4e2a\u5185\u5b58\u5730\u5740\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4f8b\u5916\u60c5\u51b5\uff1a<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>a = \"hello\"\nb = \"\".join(&#91;\"h\", \"e\", \"l\", \"l\", \"o\"])\nprint(a is b)  # False\uff0c\u867d\u7136\u5b83\u4eec\u7684\u503c\u76f8\u540c\uff0c\u4f46\u5b83\u4eec\u662f\u4e0d\u540c\u7684\u5bf9\u8c61<\/code><\/pre>\n\n\n\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>a<\/code> \u548c <code>b<\/code> \u7684\u503c\u76f8\u540c\uff0c\u4f46\u7531\u4e8e <code>b<\/code> \u662f\u901a\u8fc7 <code>join()<\/code> \u65b9\u6cd5\u521b\u5efa\u7684\uff0cPython \u4f1a\u5c06\u5b83\u4eec\u89c6\u4e3a\u4e24\u4e2a\u4e0d\u540c\u7684\u5bf9\u8c61\u3002\u56e0\u6b64\uff0c<code>a is b<\/code> \u8fd4\u56de <code>False<\/code>\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>\u603b\u7ed3\u533a\u522b\uff1a<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>==<\/code> \u6bd4\u8f83\u5bf9\u8c61\u7684 <strong>\u503c<\/strong> \u662f\u5426\u76f8\u7b49\u3002<\/li>\n\n\n\n<li><code>is<\/code> \u6bd4\u8f83\u5bf9\u8c61\u7684 <strong>\u8eab\u4efd<\/strong>\uff08\u5373\u5185\u5b58\u5730\u5740\uff09\u662f\u5426\u76f8\u540c\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>\u4ec0\u4e48\u65f6\u5019\u4f7f\u7528 <code>==<\/code> \u6216 <code>is<\/code>\uff1f<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>==<\/code><\/strong> \u5e94\u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u5bf9\u8c61\u7684\u5185\u5bb9\u662f\u5426\u76f8\u7b49\u3002\u4f8b\u5982\uff0c\u6bd4\u8f83\u4e24\u4e2a\u5b57\u7b26\u4e32\u662f\u5426\u76f8\u540c\uff0c\u6216\u8005\u4e24\u4e2a\u5217\u8868\u4e2d\u7684\u5143\u7d20\u662f\u5426\u76f8\u7b49\u3002<\/li>\n\n\n\n<li><strong><code>is<\/code><\/strong> \u5e94\u7528\u4e8e\u6bd4\u8f83\u5bf9\u8c61\u662f\u5426\u662f\u540c\u4e00\u4e2a\u5b9e\u4f8b\u3002\u901a\u5e38\u7528\u4e8e\u5224\u65ad\u4e24\u4e2a\u53d8\u91cf\u662f\u5426\u5f15\u7528\u540c\u4e00\u4e2a\u5bf9\u8c61\uff0c\u5c24\u5176\u662f\u5728\u6bd4\u8f83 <strong>\u5355\u4f8b<\/strong>\uff08\u5982 <code>None<\/code>\u3001<code>True<\/code>\u3001<code>False<\/code>\uff09\u65f6\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">\u4f8b\u5916\uff1a\u4e0e <code>None<\/code> \u7684\u6bd4\u8f83<\/h4>\n\n\n\n<p>\u5728\u6bd4\u8f83 <code>None<\/code> \u65f6\uff0c\u63a8\u8350\u4f7f\u7528 <code>is<\/code>\uff0c\u56e0\u4e3a <code>None<\/code> \u662f\u4e00\u4e2a\u552f\u4e00\u7684\u5355\u4f8b\u5bf9\u8c61\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>a = None\nprint(a is None)  # True<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">5. <strong>\u5e38\u89c1\u573a\u666f<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1. <strong>\u5355\u4f8b\u5bf9\u8c61\u6bd4\u8f83<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728 Python \u4e2d\uff0c<code>None<\/code>\u3001<code>True<\/code>\u3001<code>False<\/code> \u7b49\u662f\u5355\u4f8b\u5bf9\u8c61\uff0c\u5b83\u4eec\u5728\u6574\u4e2a\u7a0b\u5e8f\u4e2d\u53ea\u4f1a\u6709\u4e00\u4e2a\u5b9e\u4f8b\u3002\u56e0\u6b64\uff0c\u4f7f\u7528 <code>is<\/code> \u6bd4\u8f83\u8fd9\u4e9b\u5bf9\u8c61\u662f\u975e\u5e38\u5408\u9002\u7684\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>   x = None\n   y = None\n   print(x is y)  # True\uff0cNone \u662f\u552f\u4e00\u7684\u5355\u4f8b\u5bf9\u8c61\n\n   # \u63a8\u8350\u505a\u6cd5\uff1a\n   if variable is None:\n       # \u6267\u884c\u67d0\u4e9b\u64cd\u4f5c<\/code><\/pre>\n\n\n\n<p>\u8fd9\u6837\u505a\u4e0d\u4ec5\u80fd\u786e\u4fdd\u8bed\u4e49\u6e05\u6670\uff0c\u800c\u4e14\u6027\u80fd\u4e0a\u4e5f\u6709\u4f18\u52bf\uff0c\u56e0\u4e3a <code>is<\/code> \u6bd4\u8f83\u5185\u5b58\u5730\u5740\uff0c\u800c <code>==<\/code> \u6bd4\u8f83\u503c\uff0c\u4f1a\u7a0d\u5fae\u6162\u4e00\u70b9\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2. <strong>\u5b57\u7b26\u4e32\u6bd4\u8f83<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Python \u4f1a\u5bf9\u5b57\u7b26\u4e32\u8fdb\u884c <strong>\u9a7b\u7559<\/strong>\uff08interning\uff09\u4f18\u5316\uff0c\u5c24\u5176\u662f\u77ed\u5c0f\u7684\u5b57\u7b26\u4e32\u548c\u5e38\u91cf\u5b57\u7b26\u4e32\u3002\u5bf9\u4e8e\u8fd9\u4e9b\u5b57\u7b26\u4e32\uff0c<code>is<\/code> \u548c <code>==<\/code> \u7684\u884c\u4e3a\u53ef\u80fd\u4f1a\u76f8\u540c\uff0c\u4f46\u8fd9\u662f\u7531\u4e8e Python \u5185\u90e8\u4f18\u5316\u7684\u539f\u56e0\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>   a = \"hello\"\n   b = \"hello\"\n   print(a is b)  # True\uff0c\u56e0\u4e3a Python \u4f18\u5316\u4e86\u5b57\u7b26\u4e32\u9a7b\u7559\uff08interning\uff09<\/code><\/pre>\n\n\n\n<p>\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u5982\u52a8\u6001\u751f\u6210\u7684\u5b57\u7b26\u4e32\uff0c<code>is<\/code> \u53ef\u80fd\u4f1a\u8fd4\u56de <code>False<\/code>\uff0c\u5373\u4f7f\u5b83\u4eec\u7684\u503c\u76f8\u540c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>   a = \"hello\"\n   b = \"\".join(&#91;\"h\", \"e\", \"l\", \"l\", \"o\"])\n   print(a is b)  # False\uff0c\u867d\u7136\u503c\u76f8\u540c\uff0c\u4f46\u5bf9\u8c61\u4e0d\u662f\u540c\u4e00\u4e2a<\/code><\/pre>\n\n\n\n<p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c<code>is<\/code> \u548c <code>==<\/code> \u7684\u7ed3\u679c\u4f1a\u4e0d\u540c\u3002\u4e3a\u4e86\u907f\u514d\u6df7\u6dc6\uff0c\u5efa\u8bae\u5728\u6bd4\u8f83\u5b57\u7b26\u4e32\u65f6\u59cb\u7ec8\u4f7f\u7528 <code>==<\/code>\uff0c\u9664\u975e\u4f60\u6709\u7279\u6b8a\u7684\u8eab\u4efd\u6bd4\u8f83\u9700\u6c42\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3. <strong>\u53ef\u53d8\u5bf9\u8c61\uff08\u5982\u5217\u8868\u3001\u5b57\u5178\uff09<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5bf9\u4e8e <strong>\u53ef\u53d8\u5bf9\u8c61<\/strong>\uff08\u5982\u5217\u8868\u3001\u5b57\u5178\uff09\uff0c<code>is<\/code> \u7528\u6765\u68c0\u67e5\u5bf9\u8c61\u662f\u5426\u662f\u540c\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u800c <code>==<\/code> \u7528\u6765\u68c0\u67e5\u5b83\u4eec\u7684\u5185\u5bb9\u662f\u5426\u76f8\u540c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f8b\u5b50\uff1a<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>   a = &#91;1, 2, 3]\n   b = &#91;1, 2, 3]\n   print(a == b)  # True\uff0c\u5185\u5bb9\u76f8\u540c\n   print(a is b)  # False\uff0c\u867d\u7136\u5185\u5bb9\u76f8\u540c\uff0c\u4f46\u5b83\u4eec\u662f\u4e0d\u540c\u7684\u5bf9\u8c61<\/code><\/pre>\n\n\n\n<p>\u8fd9\u91cc\uff0c<code>a == b<\/code> \u8fd4\u56de <code>True<\/code>\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u503c\u662f\u76f8\u540c\u7684\uff0c\u800c <code>a is b<\/code> \u8fd4\u56de <code>False<\/code>\uff0c\u56e0\u4e3a\u5b83\u4eec\u662f\u4e0d\u540c\u7684\u5bf9\u8c61\uff0c\u4f4d\u4e8e\u4e0d\u540c\u7684\u5185\u5b58\u5730\u5740\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">6. <strong>\u6027\u80fd\u8003\u91cf<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>is<\/code> \u6bd4\u8f83\u8eab\u4efd<\/strong>\uff08\u5185\u5b58\u5730\u5740\uff09\u901a\u5e38\u6bd4 <strong><code>==<\/code> \u6bd4\u8f83\u503c<\/strong> \u66f4\u5feb\uff0c\u56e0\u4e3a <code>is<\/code> \u4e0d\u9700\u8981\u68c0\u67e5\u5bf9\u8c61\u7684\u5185\u5bb9\uff0c\u53ea\u9700\u8981\u68c0\u67e5\u5b83\u4eec\u662f\u5426\u5f15\u7528\u76f8\u540c\u7684\u5185\u5b58\u4f4d\u7f6e\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u4f60\u786e\u5b9a\u8981\u6bd4\u8f83\u7684\u5bf9\u8c61\u662f <strong>\u5355\u4f8b<\/strong>\uff08\u5982 <code>None<\/code>\u3001<code>True<\/code>\u3001<code>False<\/code>\uff09\u6216\u8005\u5df2\u7ecf\u77e5\u9053\u5b83\u4eec\u6307\u5411\u540c\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u4f7f\u7528 <code>is<\/code> \u4f1a\u66f4\u9ad8\u6548\u3002<\/li>\n\n\n\n<li>\u5bf9\u4e8e\u5927\u591a\u6570\u5176\u4ed6\u7c7b\u578b\u7684\u5bf9\u8c61\uff0c\u5c24\u5176\u662f\u4e0d\u53ef\u53d8\u5bf9\u8c61\uff08\u5982\u5b57\u7b26\u4e32\u3001\u5143\u7ec4\uff09\uff0c<code>==<\/code> \u662f\u4f60\u5e94\u8be5\u4f7f\u7528\u7684\u64cd\u4f5c\u7b26\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">7. <strong><code>==<\/code> \u548c <code>is<\/code> \u7684\u8bef\u7528<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u9519\u8bef\u5730\u4f7f\u7528 <code>is<\/code> \u6bd4\u8f83\u53ef\u53d8\u5bf9\u8c61\u7684\u5185\u5bb9\u53ef\u80fd\u4f1a\u5bfc\u81f4\u96be\u4ee5\u53d1\u73b0\u7684 bug\u3002\u4f8b\u5982\uff1a<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>   a = &#91;1, 2, 3]\n   b = a\n   print(a is b)  # True\uff0ca \u548c b \u5f15\u7528\u540c\u4e00\u4e2a\u5217\u8868\n   print(a == b)  # True\uff0ca \u548c b \u5185\u5bb9\u76f8\u540c\n\n   c = &#91;1, 2, 3]\n   print(a is c)  # False\uff0ca \u548c c \u662f\u4e0d\u540c\u7684\u5bf9\u8c61\n   print(a == c)  # True\uff0ca \u548c c \u5185\u5bb9\u76f8\u540c<\/code><\/pre>\n\n\n\n<p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c<code>a is b<\/code> \u8fd4\u56de <code>True<\/code>\uff0c\u56e0\u4e3a\u5b83\u4eec\u6307\u5411\u540c\u4e00\u4e2a\u5217\u8868\u5bf9\u8c61\u3002\u800c <code>a == c<\/code> \u8fd4\u56de <code>True<\/code>\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u503c\u76f8\u540c\uff0c\u5c3d\u7ba1 <code>a is c<\/code> \u8fd4\u56de <code>False<\/code>\uff0c\u56e0\u4e3a\u5b83\u4eec\u662f\u4e0d\u540c\u7684\u5bf9\u8c61\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">8. <strong>\u603b\u7ed3<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f7f\u7528 <code>==<\/code> \u65f6\uff0c\u5b83\u6bd4\u8f83\u7684\u662f <strong>\u503c<\/strong> \u662f\u5426\u76f8\u7b49\u3002\u9002\u7528\u4e8e\u5927\u591a\u6570\u9700\u8981\u6bd4\u8f83\u5185\u5bb9\u7684\u573a\u666f\u3002<\/li>\n\n\n\n<li>\u4f7f\u7528 <code>is<\/code> \u65f6\uff0c\u5b83\u6bd4\u8f83\u7684\u662f <strong>\u5bf9\u8c61\u8eab\u4efd<\/strong> \u662f\u5426\u76f8\u540c\u3002\u9002\u7528\u4e8e\u68c0\u67e5\u4e24\u4e2a\u5bf9\u8c61\u662f\u5426\u662f\u540c\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u901a\u5e38\u7528\u4e8e\u5355\u4f8b\u5bf9\u8c61\uff08\u5982 <code>None<\/code>\u3001<code>True<\/code>\u3001<code>False<\/code>\uff09\u6216\u5bf9\u6bd4\u540c\u4e00\u5bf9\u8c61\u7684\u5f15\u7528\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u901a\u8fc7\u7406\u89e3\u548c\u6b63\u786e\u4f7f\u7528 <code>==<\/code> \u548c <code>is<\/code>\uff0c\u53ef\u4ee5\u907f\u514d\u8bb8\u591a\u6f5c\u5728\u7684\u9519\u8bef\uff0c\u5e76\u786e\u4fdd\u4ee3\u7801\u7684\u9ad8\u6548\u6027\u548c\u53ef\u8bfb\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Python \u4e2d\uff0c== \u548c is \u90fd\u53ef\u4ee5\u7528\u4e8e\u6bd4\u8f83\u5bf9\u8c61\uff0c\u4f46\u5b83\u4eec\u7684\u884c\u4e3a\u548c\u7528\u9014\u4e0d\u540c\u3002\u4e86\u89e3\u5b83\u4eec\u4e4b\u95f4\u7684\u533a\u522b\u5bf9\u4e8e\u907f\u514d\u9519 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[],"class_list":["post-565","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/comments?post=565"}],"version-history":[{"count":1,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/565\/revisions"}],"predecessor-version":[{"id":566,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/565\/revisions\/566"}],"wp:attachment":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media?parent=565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/categories?post=565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/tags?post=565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}