{"id":1004863,"date":"2024-12-27T10:30:21","date_gmt":"2024-12-27T02:30:21","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1004863.html"},"modified":"2024-12-27T10:30:24","modified_gmt":"2024-12-27T02:30:24","slug":"python%e5%a6%82%e4%bd%95break%e5%a4%96%e5%be%aa%e7%8e%af","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1004863.html","title":{"rendered":"python\u5982\u4f55break\u5916\u5faa\u73af"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25081626\/1ab8f055-0057-42ae-9a48-1ee1c6f3da92.webp\" alt=\"python\u5982\u4f55break\u5916\u5faa\u73af\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u8981break\u5916\u5faa\u73af\uff0c\u53ef\u4ee5\u4f7f\u7528\u6807\u5fd7\u53d8\u91cf\u3001\u51fd\u6570\u5c01\u88c5\u3001\u5f02\u5e38\u5904\u7406\u6216\u76f4\u63a5\u4f7f\u7528\u7279\u5b9a\u7684Python\u7248\u672c\u7279\u6027\u3002\u6807\u5fd7\u53d8\u91cf\u662f\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u3002<\/strong>\u4e0b\u9762\u5c06\u8be6\u7ec6\u89e3\u91ca\u5982\u4f55\u4f7f\u7528\u6807\u5fd7\u53d8\u91cf\u6765break\u5916\u5faa\u73af\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u6807\u5fd7\u53d8\u91cf\u7684\u65b9\u6cd5\u662f\u4e00\u79cd\u5e38\u89c1\u4e14\u6613\u4e8e\u7406\u89e3\u7684\u65b9\u5f0f\u3002\u901a\u8fc7\u8bbe\u7f6e\u4e00\u4e2a\u6807\u5fd7\u53d8\u91cf\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u5185\u5faa\u73af\u4e2d\u6539\u53d8\u8be5\u53d8\u91cf\u7684\u72b6\u6001\uff0c\u7136\u540e\u5728\u5916\u5faa\u73af\u4e2d\u6839\u636e\u8be5\u72b6\u6001\u6765\u51b3\u5b9a\u662f\u5426break\u3002\u5177\u4f53\u5b9e\u73b0\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">found = False<\/p>\n<p>for i in range(5):<\/p>\n<p>    for j in range(5):<\/p>\n<p>        if some_condition(i, j):  # some_condition\u662f\u4e00\u4e2a\u7528\u6765\u5224\u65ad\u662f\u5426\u6ee1\u8db3\u6761\u4ef6\u7684\u51fd\u6570<\/p>\n<p>            found = True<\/p>\n<p>            break<\/p>\n<p>    if found:<\/p>\n<p>        break<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>some_condition<\/code>\u662f\u4e00\u4e2a\u7528\u6765\u5224\u65ad\u662f\u5426\u6ee1\u8db3\u67d0\u4e2a\u6761\u4ef6\u7684\u51fd\u6570\u3002\u5f53<code>some_condition(i, j)<\/code>\u8fd4\u56de<code>True<\/code>\u65f6\uff0c<code>found<\/code>\u88ab\u8bbe\u7f6e\u4e3a<code>True<\/code>\uff0c\u7136\u540e\u5185\u5faa\u73af\u88abbreak\u6389\u3002\u63a5\u7740\uff0c\u5916\u5faa\u73af\u68c0\u67e5<code>found<\/code>\u7684\u503c\uff0c\u5e76\u51b3\u5b9a\u662f\u5426\u4e5f\u8981break\u3002<\/p>\n<\/p>\n<hr>\n<h2><strong>\u4e00\u3001\u4f7f\u7528\u6807\u5fd7\u53d8\u91cf<\/strong><\/h2>\n<p><p>\u4f7f\u7528\u6807\u5fd7\u53d8\u91cf\u662f\u4e00\u79cd\u7b80\u5355\u800c\u6709\u6548\u7684\u65b9\u6cd5\u6765break\u5916\u5faa\u73af\u3002\u901a\u8fc7\u5728\u5185\u5faa\u73af\u4e2d\u8bbe\u7f6e\u4e00\u4e2a\u6807\u5fd7\u53d8\u91cf\uff0c\u5e76\u5728\u5916\u5faa\u73af\u4e2d\u68c0\u67e5\u8be5\u53d8\u91cf\u7684\u72b6\u6001\uff0c\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u63a7\u5236\u5faa\u73af\u7684\u6d41\u52a8\u3002<\/p>\n<\/p>\n<p><p>\u6807\u5fd7\u53d8\u91cf\u901a\u5e38\u88ab\u521d\u59cb\u5316\u4e3a<code>False<\/code>\uff0c\u5f53\u6ee1\u8db3\u67d0\u4e2a\u6761\u4ef6\u65f6\u5728\u5185\u5faa\u73af\u4e2d\u5c06\u5176\u8bbe\u7f6e\u4e3a<code>True<\/code>\uff0c\u7136\u540e\u5728\u5916\u5faa\u73af\u4e2d\u6839\u636e\u8be5\u53d8\u91cf\u7684\u503c\u6765\u51b3\u5b9a\u662f\u5426break\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u5728\u4e8e\u5176\u7b80\u5355\u6027\u548c\u53ef\u8bfb\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">found = False<\/p>\n<p>for i in range(5):<\/p>\n<p>    for j in range(5):<\/p>\n<p>        if some_condition(i, j):<\/p>\n<p>            found = True<\/p>\n<p>            break<\/p>\n<p>    if found:<\/p>\n<p>        break<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4ee3\u7801\u7247\u6bb5\u4e2d\uff0c<code>found<\/code>\u53d8\u91cf\u7528\u6765\u6807\u8bc6\u662f\u5426\u627e\u5230\u4e86\u6ee1\u8db3\u6761\u4ef6\u7684\u7ec4\u5408\u3002\u5f53<code>some_condition(i, j)<\/code>\u4e3a<code>True<\/code>\u65f6\uff0c<code>found<\/code>\u88ab\u8bbe\u7f6e\u4e3a<code>True<\/code>\uff0c\u5185\u5faa\u73af\u7ec8\u6b62\u3002\u7136\u540e\uff0c\u5916\u5faa\u73af\u68c0\u67e5<code>found<\/code>\u7684\u503c\uff0c\u5e76\u6839\u636e\u5176\u72b6\u6001\u51b3\u5b9a\u662f\u5426\u7ed3\u675f\u3002<\/p>\n<\/p>\n<h2><strong>\u4e8c\u3001\u4f7f\u7528\u51fd\u6570\u5c01\u88c5<\/strong><\/h2>\n<p><p>\u53e6\u4e00\u79cd\u5b9e\u73b0break\u5916\u5faa\u73af\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u51fd\u6570\u5c01\u88c5\u3002\u901a\u8fc7\u5c06\u5faa\u73af\u903b\u8f91\u5c01\u88c5\u5230\u4e00\u4e2a\u51fd\u6570\u4e2d\uff0c\u5e76\u4f7f\u7528<code>return<\/code>\u8bed\u53e5\u6765\u9000\u51fa\u51fd\u6570\uff0c\u53ef\u4ee5\u8fbe\u5230\u7ec8\u6b62\u5916\u5faa\u73af\u7684\u6548\u679c\u3002<\/p>\n<\/p>\n<p><p>\u51fd\u6570\u5c01\u88c5\u7684\u597d\u5904\u662f\u4ee3\u7801\u7ed3\u6784\u66f4\u52a0\u6a21\u5757\u5316\u548c\u6e05\u6670\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u590d\u7528\u548c\u6d4b\u8bd5\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def search():<\/p>\n<p>    for i in range(5):<\/p>\n<p>        for j in range(5):<\/p>\n<p>            if some_condition(i, j):<\/p>\n<p>                return i, j<\/p>\n<p>    return None<\/p>\n<p>result = search()<\/p>\n<p>if result:<\/p>\n<p>    print(&quot;Found:&quot;, result)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;Not found&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>search<\/code>\u51fd\u6570\u5c01\u88c5\u4e86\u5faa\u73af\u903b\u8f91\uff0c\u5f53\u6761\u4ef6\u6ee1\u8db3\u65f6\uff0c\u901a\u8fc7<code>return<\/code>\u8fd4\u56de\u7ed3\u679c\uff0c\u4ece\u800c\u9000\u51fa\u6574\u4e2a\u51fd\u6570\u3002\u8c03\u7528\u8be5\u51fd\u6570\u540e\uff0c\u53ef\u4ee5\u6839\u636e\u8fd4\u56de\u503c\u5224\u65ad\u662f\u5426\u627e\u5230\u4e86\u7ed3\u679c\u3002<\/p>\n<\/p>\n<h2><strong>\u4e09\u3001\u4f7f\u7528\u5f02\u5e38\u5904\u7406<\/strong><\/h2>\n<p><p>\u5f02\u5e38\u5904\u7406\u662f\u53e6\u4e00\u79cdbreak\u5916\u5faa\u73af\u7684\u65b9\u6cd5\u3002\u901a\u8fc7\u5728\u5185\u5faa\u73af\u4e2d\u629b\u51fa\u4e00\u4e2a\u81ea\u5b9a\u4e49\u5f02\u5e38\uff0c\u5e76\u5728\u5916\u5faa\u73af\u4e2d\u6355\u83b7\u8be5\u5f02\u5e38\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5faa\u73af\u7684\u4e2d\u65ad\u3002<\/p>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u867d\u7136\u4e0d\u5982\u6807\u5fd7\u53d8\u91cf\u548c\u51fd\u6570\u5c01\u88c5\u5e38\u7528\uff0c\u4f46\u5728\u67d0\u4e9b\u573a\u666f\u4e0b\u53ef\u80fd\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class BreakLoop(Exception):<\/p>\n<p>    pass<\/p>\n<p>try:<\/p>\n<p>    for i in range(5):<\/p>\n<p>        for j in range(5):<\/p>\n<p>            if some_condition(i, j):<\/p>\n<p>                r<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>se BreakLoop<\/p>\n<p>except BreakLoop:<\/p>\n<p>    print(&quot;Loop broken&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4ee3\u7801\u7247\u6bb5\u4e2d\uff0c\u81ea\u5b9a\u4e49\u5f02\u5e38<code>BreakLoop<\/code>\u7528\u4e8e\u4e2d\u65ad\u5faa\u73af\u3002\u5f53\u6ee1\u8db3\u6761\u4ef6\u65f6\uff0c<code>BreakLoop<\/code>\u5f02\u5e38\u88ab\u629b\u51fa\uff0c\u5916\u5faa\u73af\u6355\u83b7\u8be5\u5f02\u5e38\u5e76\u7ec8\u6b62\u6267\u884c\u3002<\/p>\n<\/p>\n<h2><strong>\u56db\u3001\u4f7f\u7528\u7279\u5b9a\u7248\u672c\u7279\u6027<\/strong><\/h2>\n<p><p>\u5728\u67d0\u4e9b\u7f16\u7a0b\u8bed\u8a00\u4e2d\uff0c\u53ef\u80fd\u5b58\u5728\u7279\u5b9a\u7684\u8bed\u8a00\u7279\u6027\u6216\u8bed\u6cd5\u7cd6\u6765\u76f4\u63a5\u652f\u6301break\u5916\u5faa\u73af\u3002\u7136\u800c\uff0cPython\u672c\u8eab\u5e76\u6ca1\u6709\u76f4\u63a5\u652f\u6301\u8fd9\u6837\u7684\u8bed\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9bPython\u7684\u53d8\u4f53\u6216\u6269\u5c55\u4e2d\uff0c\u53ef\u80fd\u4f1a\u6709\u7c7b\u4f3c\u7684\u529f\u80fd\uff0c\u4f46\u5728\u6807\u51c6\u7684Python\u4e2d\uff0c\u4ee5\u4e0a\u4ecb\u7ecd\u7684\u65b9\u6cd5\u662f\u5b9e\u73b0break\u5916\u5faa\u73af\u7684\u4e3b\u8981\u624b\u6bb5\u3002<\/p>\n<\/p>\n<p><p>\u867d\u7136Python\u6ca1\u6709\u5185\u7f6e\u7684\u76f4\u63a5break\u5916\u5faa\u73af\u7684\u8bed\u6cd5\uff0c\u4f46\u901a\u8fc7\u6807\u5fd7\u53d8\u91cf\u3001\u51fd\u6570\u5c01\u88c5\u548c\u5f02\u5e38\u5904\u7406\u7b49\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7075\u6d3b\u5730\u63a7\u5236\u5faa\u73af\u7684\u6267\u884c\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5404\u6709\u4f18\u7f3a\u70b9\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u60c5\u51b5\u9009\u62e9\u5408\u9002\u7684\u5b9e\u73b0\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<h2><strong>\u4e94\u3001\u603b\u7ed3\u4e0e\u6700\u4f73\u5b9e\u8df5<\/strong><\/h2>\n<p><p>\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\uff0c\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u6765break\u5916\u5faa\u73af\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u548c\u4ee3\u7801\u98ce\u683c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5efa\u8bae\u548c\u6700\u4f73\u5b9e\u8df5\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528\u6807\u5fd7\u53d8\u91cf<\/strong>\uff1a\u5bf9\u4e8e\u7b80\u5355\u7684\u5faa\u73af\u903b\u8f91\uff0c\u6807\u5fd7\u53d8\u91cf\u662f\u6700\u5e38\u89c1\u548c\u6613\u4e8e\u7406\u89e3\u7684\u65b9\u6cd5\u3002\u5b83\u7684\u4f18\u70b9\u5728\u4e8e\u4ee3\u7801\u7b80\u5355\u76f4\u89c2\uff0c\u9002\u5408\u5927\u591a\u6570\u60c5\u51b5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u51fd\u6570\u5c01\u88c5<\/strong>\uff1a\u5f53\u9700\u8981\u6a21\u5757\u5316\u8bbe\u8ba1\u6216\u8005\u5faa\u73af\u903b\u8f91\u8f83\u590d\u6742\u65f6\uff0c\u4f7f\u7528\u51fd\u6570\u5c01\u88c5\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002\u901a\u8fc7<code>return<\/code>\u8bed\u53e5\u9000\u51fa\u51fd\u6570\uff0c\u53ef\u4ee5\u6709\u6548\u5730break\u5916\u5faa\u73af\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u5f02\u5e38\u5904\u7406<\/strong>\uff1a\u5728\u67d0\u4e9b\u7279\u5b9a\u573a\u666f\u4e0b\uff0c\u4f7f\u7528\u5f02\u5e38\u5904\u7406\u53ef\u4ee5\u63d0\u4f9b\u4e00\u79cd\u4f18\u96c5\u7684\u89e3\u51b3\u65b9\u6848\u3002\u7279\u522b\u662f\u5728\u9700\u8981\u5904\u7406\u590d\u6742\u7684\u9519\u8bef\u6216\u4e2d\u65ad\u903b\u8f91\u65f6\uff0c\u81ea\u5b9a\u4e49\u5f02\u5e38\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u5de5\u5177\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u907f\u514d\u8fc7\u5ea6\u4f7f\u7528<\/strong>\uff1a\u65e0\u8bba\u4f7f\u7528\u54ea\u79cd\u65b9\u6cd5\uff0c\u90fd\u5e94\u907f\u514d\u8fc7\u5ea6\u4f7f\u7528\u5d4c\u5957\u5faa\u73af\u548cbreak\u8bed\u53e5\uff0c\u4ee5\u4fdd\u6301\u4ee3\u7801\u7684\u6e05\u6670\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002\u9002\u5f53\u5730\u7b80\u5316\u5faa\u73af\u903b\u8f91\uff0c\u6216\u8005\u4f7f\u7528\u66f4\u9ad8\u7ea7\u7684\u6570\u636e\u7ed3\u6784\u6216\u7b97\u6cd5\uff0c\u53ef\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u6548\u7387\u548c\u53ef\u8bfb\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u603b\u4e4b\uff0cbreak\u5916\u5faa\u73af\u5728Python\u4e2d\u5e76\u6ca1\u6709\u76f4\u63a5\u7684\u8bed\u6cd5\u652f\u6301\uff0c\u4f46\u901a\u8fc7\u591a\u79cd\u95f4\u63a5\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u7075\u6d3b\u5730\u5b9e\u73b0\u8fd9\u4e00\u9700\u6c42\u3002\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u4e0d\u4ec5\u53ef\u4ee5\u89e3\u51b3\u95ee\u9898\uff0c\u8fd8\u80fd\u63d0\u9ad8\u4ee3\u7801\u7684\u8d28\u91cf\u548c\u53ef\u8bfb\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u4f18\u96c5\u5730\u9000\u51fa\u5916\u5c42\u5faa\u73af\uff1f<\/strong><br \/>\u8981\u4f18\u96c5\u5730\u9000\u51fa\u5916\u5c42\u5faa\u73af\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e2a\u6807\u5fd7\u53d8\u91cf\u6765\u63a7\u5236\u5916\u5c42\u5faa\u73af\u7684\u6267\u884c\u3002\u5f53\u5185\u5c42\u5faa\u73af\u6ee1\u8db3\u7279\u5b9a\u6761\u4ef6\u65f6\uff0c\u53ef\u4ee5\u5c06\u6807\u5fd7\u53d8\u91cf\u8bbe\u4e3aTrue\uff0c\u5916\u5c42\u5faa\u73af\u6839\u636e\u8be5\u53d8\u91cf\u7684\u503c\u51b3\u5b9a\u662f\u5426\u7ee7\u7eed\u6267\u884c\u3002\u8fd9\u79cd\u65b9\u5f0f\u80fd\u591f\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u7ef4\u62a4\u6027\u3002<\/p>\n<p><strong>\u5728\u5d4c\u5957\u5faa\u73af\u4e2d\uff0c\u5982\u4f55\u4f7f\u7528\u5f02\u5e38\u6765\u9000\u51fa\u5916\u5c42\u5faa\u73af\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u81ea\u5b9a\u4e49\u5f02\u5e38\u6765\u5b9e\u73b0\u4ece\u5185\u5c42\u5faa\u73af\u76f4\u63a5\u8df3\u51fa\u5916\u5c42\u5faa\u73af\u7684\u6548\u679c\u3002\u5b9a\u4e49\u4e00\u4e2a\u5f02\u5e38\u7c7b\uff0c\u5728\u5185\u5c42\u5faa\u73af\u4e2d\u629b\u51fa\u8be5\u5f02\u5e38\uff0c\u5728\u5916\u5c42\u5faa\u73af\u4e2d\u6355\u83b7\u5b83\u3002\u6b64\u65b9\u6cd5\u80fd\u591f\u8ba9\u4ee3\u7801\u903b\u8f91\u66f4\u52a0\u6e05\u6670\uff0c\u540c\u65f6\u907f\u514d\u4e86\u590d\u6742\u7684\u6807\u5fd7\u53d8\u91cf\u3002<\/p>\n<p><strong>\u6709\u6ca1\u6709\u5176\u4ed6\u65b9\u6cd5\u53ef\u4ee5\u5728Python\u4e2d\u63a7\u5236\u5faa\u73af\u7684\u6267\u884c\u6d41\uff1f<\/strong><br \/>\u9664\u4e86\u4f7f\u7528\u6807\u5fd7\u53d8\u91cf\u548c\u5f02\u5e38\u5916\uff0c\u8fd8\u53ef\u4ee5\u5229\u7528\u51fd\u6570\u6765\u5c01\u88c5\u5faa\u73af\u903b\u8f91\u3002\u5c06\u5faa\u73af\u653e\u5728\u4e00\u4e2a\u51fd\u6570\u4e2d\uff0c\u5f53\u9700\u8981\u9000\u51fa\u5916\u5c42\u5faa\u73af\u65f6\uff0c\u53ef\u4ee5\u76f4\u63a5\u8fd4\u56de\u51fd\u6570\uff0c\u8fd9\u6837\u5c31\u80fd\u5b9e\u73b0\u8df3\u51fa\u5faa\u73af\u7684\u6548\u679c\u3002\u8fd9\u79cd\u65b9\u6cd5\u6709\u52a9\u4e8e\u63d0\u9ad8\u4ee3\u7801\u7684\u6a21\u5757\u5316\u548c\u590d\u7528\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u8981break\u5916\u5faa\u73af\uff0c\u53ef\u4ee5\u4f7f\u7528\u6807\u5fd7\u53d8\u91cf\u3001\u51fd\u6570\u5c01\u88c5\u3001\u5f02\u5e38\u5904\u7406\u6216\u76f4\u63a5\u4f7f\u7528\u7279\u5b9a\u7684Python\u7248\u672c\u7279\u6027 [&hellip;]","protected":false},"author":3,"featured_media":1004866,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1004863"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1004863"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1004863\/revisions"}],"predecessor-version":[{"id":1004868,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1004863\/revisions\/1004868"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1004866"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1004863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1004863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1004863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}