{"id":958446,"date":"2024-12-27T03:27:47","date_gmt":"2024-12-26T19:27:47","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/958446.html"},"modified":"2024-12-27T03:27:51","modified_gmt":"2024-12-26T19:27:51","slug":"python%e5%a6%82%e4%bd%95%e7%9c%8bout%e7%bb%93%e6%9e%9c","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/958446.html","title":{"rendered":"python\u5982\u4f55\u770bout\u7ed3\u679c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25101510\/b7afac27-d604-4911-8078-42e17f383713.webp\" alt=\"python\u5982\u4f55\u770bout\u7ed3\u679c\" \/><\/p>\n<p><p> <strong>\u8981\u67e5\u770bPython\u4e2d\u51fd\u6570\u6216\u4ee3\u7801\u7247\u6bb5\u7684\u8f93\u51fa\u7ed3\u679c\uff0c\u53ef\u4ee5\u4f7f\u7528<code>print<\/code>\u51fd\u6570\u3001\u8c03\u8bd5\u5668\u3001\u65e5\u5fd7\u8bb0\u5f55\u7b49\u65b9\u6cd5\u3002\u4f7f\u7528<code>print<\/code>\u51fd\u6570\u662f\u6700\u7b80\u5355\u76f4\u63a5\u7684\u65b9\u5f0f\uff0c\u5b83\u53ef\u4ee5\u5c06\u8f93\u51fa\u7ed3\u679c\u6253\u5370\u5230\u63a7\u5236\u53f0\u3002\u8c03\u8bd5\u5668\u53ef\u4ee5\u8ba9\u4f60\u9010\u6b65\u6267\u884c\u4ee3\u7801\uff0c\u67e5\u770b\u6bcf\u4e00\u6b65\u7684\u7ed3\u679c\u3002\u65e5\u5fd7\u8bb0\u5f55\u5219\u9002\u7528\u4e8e\u9700\u8981\u957f\u671f\u8bb0\u5f55\u7a0b\u5e8f\u8f93\u51fa\u7684\u573a\u666f\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u4f7f\u7528<code>print<\/code>\u51fd\u6570\u67e5\u770b\u8f93\u51fa\u7684\u65b9\u6cd5\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528<code>print<\/code>\u51fd\u6570\u662fPython\u4e2d\u6700\u5e38\u7528\u7684\u67e5\u770b\u8f93\u51fa\u7ed3\u679c\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u5728\u4ee3\u7801\u4e2d\u63d2\u5165<code>print<\/code>\u8bed\u53e5\uff0c\u5c06\u53d8\u91cf\u6216\u8868\u8fbe\u5f0f\u7684\u503c\u6253\u5370\u5230\u63a7\u5236\u53f0\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">result = some_function()<\/p>\n<p>print(&quot;The result is:&quot;, result)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u4e14\u76f4\u63a5\uff0c\u9002\u5408\u7528\u4e8e\u8c03\u8bd5\u548c\u67e5\u770b\u4ee3\u7801\u4e2d\u95f4\u7ed3\u679c\u3002\u7136\u800c\uff0c\u5728\u5927\u578b\u9879\u76ee\u4e2d\uff0c\u9891\u7e41\u4f7f\u7528<code>print<\/code>\u53ef\u80fd\u4f1a\u5bfc\u81f4\u63a7\u5236\u53f0\u8f93\u51fa\u6df7\u4e71\uff0c\u56e0\u6b64\u9700\u8981\u6ce8\u610f\u9002\u5ea6\u4f7f\u7528\u3002\u540c\u65f6\uff0c\u4f7f\u7528\u65e5\u5fd7\u8bb0\u5f55\u5de5\u5177\u53ef\u4ee5\u66f4\u597d\u5730\u7ba1\u7406\u8f93\u51fa\u4fe1\u606f\u3002<\/p>\n<\/p>\n<hr>\n<p><h3>\u4e00\u3001\u4f7f\u7528 <code>PRINT<\/code> \u51fd\u6570\u67e5\u770b\u8f93\u51fa\u7ed3\u679c<\/h3>\n<\/p>\n<p><p><code>print<\/code>\u51fd\u6570\u662fPython\u4e2d\u6700\u57fa\u672c\u7684\u8f93\u51fa\u65b9\u6cd5\uff0c\u7528\u4e8e\u5c06\u7ed3\u679c\u8f93\u51fa\u5230\u63a7\u5236\u53f0\u3002\u5b83\u7684\u4f7f\u7528\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5c06\u8981\u8f93\u51fa\u7684\u5185\u5bb9\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9<code>print<\/code>\u51fd\u6570\u5373\u53ef\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u57fa\u672c\u7528\u6cd5<\/h4>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c<code>print<\/code>\u51fd\u6570\u53ef\u4ee5\u8f93\u51fa\u5b57\u7b26\u4e32\u3001\u6570\u5b57\u3001\u5217\u8868\u3001\u5b57\u5178\u7b49\u5404\u79cd\u6570\u636e\u7c7b\u578b\u3002\u4e0b\u9762\u662f\u4e00\u4e9b\u57fa\u672c\u7528\u6cd5\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8f93\u51fa\u5b57\u7b26\u4e32<\/p>\n<p>print(&quot;Hello, World!&quot;)<\/p>\n<h2><strong>\u8f93\u51fa\u6570\u5b57<\/strong><\/h2>\n<p>print(123)<\/p>\n<h2><strong>\u8f93\u51fa\u53d8\u91cf<\/strong><\/h2>\n<p>x = 10<\/p>\n<p>print(x)<\/p>\n<h2><strong>\u8f93\u51fa\u591a\u4e2a\u53d8\u91cf<\/strong><\/h2>\n<p>name = &quot;Alice&quot;<\/p>\n<p>age = 25<\/p>\n<p>print(&quot;Name:&quot;, name, &quot;Age:&quot;, age)<\/p>\n<h2><strong>\u8f93\u51fa\u6570\u636e\u7ed3\u6784<\/strong><\/h2>\n<p>my_list = [1, 2, 3]<\/p>\n<p>print(&quot;List:&quot;, my_list)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u683c\u5f0f\u5316\u8f93\u51fa<\/h4>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5f80\u5f80\u9700\u8981\u683c\u5f0f\u5316\u8f93\u51fa\u4fe1\u606f\u3002Python\u63d0\u4f9b\u4e86\u591a\u79cd\u683c\u5f0f\u5316\u8f93\u51fa\u7684\u65b9\u5f0f\uff0c\u5305\u62ec\u4f7f\u7528\u767e\u5206\u53f7\uff08<code>%<\/code>\uff09\u3001<code>str.format()<\/code>\u65b9\u6cd5\u4ee5\u53caf\u5b57\u7b26\u4e32\uff08f-string\uff09\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>\u767e\u5206\u53f7\uff08%\uff09\u683c\u5f0f\u5316<\/strong><\/li>\n<\/ul>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7c7b\u4f3c\u4e8eC\u8bed\u8a00\u4e2d\u7684printf\uff0c\u901a\u8fc7\u5728\u5b57\u7b26\u4e32\u4e2d\u4f7f\u7528<code>%<\/code>\u7b26\u53f7\u6765\u5360\u4f4d\uff0c\u7136\u540e\u5728\u5b57\u7b26\u4e32\u540e\u9762\u63d0\u4f9b\u503c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">name = &quot;Alice&quot;<\/p>\n<p>age = 25<\/p>\n<p>print(&quot;Name: %s, Age: %d&quot; % (name, age))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ul>\n<li><strong><code>str.format()<\/code>\u65b9\u6cd5<\/strong><\/li>\n<\/ul>\n<p><p><code>str.format()<\/code>\u65b9\u6cd5\u901a\u8fc7\u5728\u5b57\u7b26\u4e32\u4e2d\u4f7f\u7528\u82b1\u62ec\u53f7<code>{}<\/code>\u5360\u4f4d\uff0c\u7136\u540e\u8c03\u7528<code>format()<\/code>\u65b9\u6cd5\u63d0\u4f9b\u503c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">name = &quot;Alice&quot;<\/p>\n<p>age = 25<\/p>\n<p>print(&quot;Name: {}, Age: {}&quot;.format(name, age))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ul>\n<li><strong>f\u5b57\u7b26\u4e32\uff08f-string\uff09<\/strong><\/li>\n<\/ul>\n<p><p>f\u5b57\u7b26\u4e32\u662fPython3.6\u53ca\u4ee5\u4e0a\u7248\u672c\u63d0\u4f9b\u7684\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u7684\u65b9\u5f0f\uff0c\u4f7f\u7528\u66f4\u7b80\u6d01\uff0c\u5728\u5b57\u7b26\u4e32\u524d\u52a0<code>f<\/code>\uff0c\u76f4\u63a5\u5728\u5b57\u7b26\u4e32\u4e2d\u5d4c\u5165\u53d8\u91cf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">name = &quot;Alice&quot;<\/p>\n<p>age = 25<\/p>\n<p>print(f&quot;Name: {name}, Age: {age}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u8c03\u8bd5\u5668\u67e5\u770b\u8f93\u51fa\u7ed3\u679c<\/h3>\n<\/p>\n<p><p>\u8c03\u8bd5\u5668\u662f\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u975e\u5e38\u91cd\u8981\u7684\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u9010\u6b65\u6267\u884c\u4ee3\u7801\uff0c\u67e5\u770b\u6bcf\u4e00\u6b65\u7684\u8f93\u51fa\u7ed3\u679c\uff0c\u5e2e\u52a9\u5b9a\u4f4d\u548c\u89e3\u51b3\u95ee\u9898\u3002Python\u4e2d\u5e38\u7528\u7684\u8c03\u8bd5\u5668\u6709<code>pdb<\/code>\u548c\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u81ea\u5e26\u7684\u8c03\u8bd5\u5de5\u5177\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528 <code>pdb<\/code> \u6a21\u5757<\/h4>\n<\/p>\n<p><p><code>pdb<\/code>\u662fPython\u81ea\u5e26\u7684\u8c03\u8bd5\u5de5\u5177\uff0c\u53ef\u4ee5\u76f4\u63a5\u5728\u4ee3\u7801\u4e2d\u63d2\u5165\u65ad\u70b9\uff0c\u7136\u540e\u9010\u6b65\u6267\u884c\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pdb<\/p>\n<p>def my_function():<\/p>\n<p>    x = 10<\/p>\n<p>    y = 20<\/p>\n<p>    pdb.set_trace()  # \u8bbe\u7f6e\u65ad\u70b9<\/p>\n<p>    result = x + y<\/p>\n<p>    return result<\/p>\n<p>my_function()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6267\u884c\u4ee3\u7801\u540e\uff0c\u7a0b\u5e8f\u4f1a\u5728<code>pdb.set_trace()<\/code>\u5904\u6682\u505c\uff0c\u8fdb\u5165\u8c03\u8bd5\u6a21\u5f0f\uff0c\u53ef\u4ee5\u8f93\u5165\u547d\u4ee4\u67e5\u770b\u53d8\u91cf\u503c\u3001\u6267\u884c\u4e0b\u4e00\u6b65\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u5e38\u7528\u7684<code>pdb<\/code>\u547d\u4ee4\u5305\u62ec\uff1a<\/p>\n<\/p>\n<ul>\n<li><code>n<\/code>\uff1a\u6267\u884c\u4e0b\u4e00\u6b65<\/li>\n<li><code>c<\/code>\uff1a\u7ee7\u7eed\u6267\u884c\u5230\u4e0b\u4e00\u4e2a\u65ad\u70b9<\/li>\n<li><code>q<\/code>\uff1a\u9000\u51fa\u8c03\u8bd5\u6a21\u5f0f<\/li>\n<li><code>p<\/code>\uff1a\u6253\u5370\u53d8\u91cf\u503c<\/li>\n<\/ul>\n<p><h4>2\u3001\u4f7f\u7528 IDE \u8c03\u8bd5\u5de5\u5177<\/h4>\n<\/p>\n<p><p>\u5927\u591a\u6570IDE\u90fd\u63d0\u4f9b\u4e86\u56fe\u5f62\u5316\u7684\u8c03\u8bd5\u5de5\u5177\uff0c\u6bd4\u5982PyCharm\u3001Visual Studio Code\u7b49\u3002\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\uff0c\u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u8bbe\u7f6e\u65ad\u70b9\uff0c\u7136\u540e\u542f\u52a8\u8c03\u8bd5\u6a21\u5f0f\uff0c\u9010\u6b65\u67e5\u770b\u4ee3\u7801\u6267\u884c\u8fc7\u7a0b\u4e2d\u7684\u53d8\u91cf\u503c\u548c\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u65e5\u5fd7\u8bb0\u5f55\u67e5\u770b\u8f93\u51fa\u7ed3\u679c<\/h3>\n<\/p>\n<p><p>\u65e5\u5fd7\u8bb0\u5f55\u662f\u8bb0\u5f55\u7a0b\u5e8f\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u91cd\u8981\u4e8b\u4ef6\u7684\u8fc7\u7a0b\uff0c\u9002\u7528\u4e8e\u9700\u8981\u957f\u671f\u76d1\u63a7\u7a0b\u5e8f\u8f93\u51fa\u7684\u573a\u666f\u3002Python\u63d0\u4f9b\u4e86<code>logging<\/code>\u6a21\u5757\u6765\u652f\u6301\u65e5\u5fd7\u8bb0\u5f55\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u57fa\u672c\u7528\u6cd5<\/h4>\n<\/p>\n<p><p><code>logging<\/code>\u6a21\u5757\u53ef\u4ee5\u5c06\u8f93\u51fa\u8bb0\u5f55\u5230\u63a7\u5236\u53f0\u3001\u6587\u4ef6\u7b49\u591a\u79cd\u76ee\u6807\uff0c\u5e76\u652f\u6301\u591a\u79cd\u65e5\u5fd7\u7ea7\u522b\uff08DEBUG, INFO, WARNING, ERROR, CRITICAL\uff09\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u57fa\u672c\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import logging<\/p>\n<h2><strong>\u914d\u7f6e\u65e5\u5fd7\u683c\u5f0f\u548c\u7ea7\u522b<\/strong><\/h2>\n<p>logging.basicConfig(level=logging.INFO, format=&#39;%(asctime)s - %(levelname)s - %(message)s&#39;)<\/p>\n<p>def my_function():<\/p>\n<p>    x = 10<\/p>\n<p>    y = 20<\/p>\n<p>    result = x + y<\/p>\n<p>    logging.info(f&quot;Result: {result}&quot;)<\/p>\n<p>    return result<\/p>\n<p>my_function()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>logging.info()<\/code>\u7528\u4e8e\u8bb0\u5f55\u4fe1\u606f\u7ea7\u522b\u7684\u65e5\u5fd7\uff0c\u65e5\u5fd7\u683c\u5f0f\u4e2d\u5305\u542b\u65f6\u95f4\u3001\u65e5\u5fd7\u7ea7\u522b\u548c\u6d88\u606f\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u8bb0\u5f55\u5230\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u9664\u4e86\u8f93\u51fa\u5230\u63a7\u5236\u53f0\uff0c\u65e5\u5fd7\u8fd8\u53ef\u4ee5\u8bb0\u5f55\u5230\u6587\u4ef6\uff0c\u65b9\u4fbf\u540e\u7eed\u67e5\u770b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import logging<\/p>\n<h2><strong>\u914d\u7f6e\u65e5\u5fd7\u8bb0\u5f55\u5230\u6587\u4ef6<\/strong><\/h2>\n<p>logging.basicConfig(filename=&#39;app.log&#39;, level=logging.INFO, format=&#39;%(asctime)s - %(levelname)s - %(message)s&#39;)<\/p>\n<p>def my_function():<\/p>\n<p>    x = 10<\/p>\n<p>    y = 20<\/p>\n<p>    result = x + y<\/p>\n<p>    logging.info(f&quot;Result: {result}&quot;)<\/p>\n<p>    return result<\/p>\n<p>my_function()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u65e5\u5fd7\u8bb0\u5f55\u5230\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u67e5\u770b\u6587\u4ef6\u5185\u5bb9\u6765\u4e86\u89e3\u7a0b\u5e8f\u7684\u8fd0\u884c\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u67e5\u770bPython\u4e2d\u51fd\u6570\u6216\u4ee3\u7801\u7247\u6bb5\u7684\u8f93\u51fa\u7ed3\u679c\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002<code>print<\/code>\u51fd\u6570\u7b80\u5355\u76f4\u63a5\uff0c\u9002\u5408\u5feb\u901f\u8c03\u8bd5\uff1b\u8c03\u8bd5\u5668\u53ef\u4ee5\u9010\u6b65\u6267\u884c\u4ee3\u7801\uff0c\u5e2e\u52a9\u6df1\u5165\u5206\u6790\uff1b\u65e5\u5fd7\u8bb0\u5f55\u5219\u9002\u5408\u7528\u4e8e\u957f\u671f\u76d1\u63a7\u548c\u8bb0\u5f55\u7a0b\u5e8f\u8f93\u51fa\u3002\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\uff0c\u53ef\u4ee5\u7ed3\u5408\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u6700\u5408\u9002\u7684\u65b9\u6848\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u67e5\u770b\u7a0b\u5e8f\u7684\u8f93\u51fa\u7ed3\u679c\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u8f93\u51fa\u7ed3\u679c\u901a\u5e38\u4f7f\u7528<code>print()<\/code>\u51fd\u6570\u6765\u663e\u793a\u3002\u901a\u8fc7\u5c06\u53d8\u91cf\u6216\u6587\u672c\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9<code>print()<\/code>\uff0c\u53ef\u4ee5\u8f7b\u677e\u67e5\u770b\u7a0b\u5e8f\u8fd0\u884c\u7684\u7ed3\u679c\u3002\u6b64\u5916\uff0c\u4f7f\u7528IDE\uff08\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff09\u5982PyCharm\u6216Jupyter Notebook\u53ef\u4ee5\u66f4\u76f4\u89c2\u5730\u67e5\u770b\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<p><strong>Python\u4e2d\u5982\u4f55\u91cd\u5b9a\u5411\u8f93\u51fa\u5230\u6587\u4ef6\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528<code>sys<\/code>\u6a21\u5757\u4e2d\u7684<code>stdout<\/code>\u6765\u5c06\u8f93\u51fa\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002\u901a\u8fc7\u6253\u5f00\u6587\u4ef6\u5e76\u5c06<code>sys.stdout<\/code>\u6307\u5411\u8be5\u6587\u4ef6\uff0c\u53ef\u4ee5\u5c06\u6240\u6709\u7684\u8f93\u51fa\u4fe1\u606f\u5199\u5165\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u663e\u793a\u5728\u63a7\u5236\u53f0\u3002\u8fd9\u5bf9\u4e8e\u8c03\u8bd5\u548c\u8bb0\u5f55\u7a0b\u5e8f\u7684\u8f93\u51fa\u975e\u5e38\u6709\u7528\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u8c03\u8bd5\u8f93\u51fa\u4ee5\u83b7\u53d6\u66f4\u591a\u4fe1\u606f\uff1f<\/strong><br \/>\u4f7f\u7528<code>logging<\/code>\u6a21\u5757\u53ef\u4ee5\u63d0\u4f9b\u6bd4<code>print()<\/code>\u66f4\u4e30\u5bcc\u7684\u8f93\u51fa\u4fe1\u606f\u3002\u901a\u8fc7\u8bbe\u7f6e\u4e0d\u540c\u7684\u65e5\u5fd7\u7ea7\u522b\uff08\u5982DEBUG\u3001INFO\u3001WARNING\u7b49\uff09\uff0c\u53ef\u4ee5\u63a7\u5236\u8f93\u51fa\u7684\u4fe1\u606f\u91cf\u548c\u7c7b\u578b\u3002\u6b64\u5916\uff0c\u65e5\u5fd7\u53ef\u4ee5\u8bb0\u5f55\u5230\u6587\u4ef6\u4e2d\uff0c\u4fbf\u4e8e\u540e\u7eed\u5206\u6790\u548c\u8c03\u8bd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u67e5\u770bPython\u4e2d\u51fd\u6570\u6216\u4ee3\u7801\u7247\u6bb5\u7684\u8f93\u51fa\u7ed3\u679c\uff0c\u53ef\u4ee5\u4f7f\u7528print\u51fd\u6570\u3001\u8c03\u8bd5\u5668\u3001\u65e5\u5fd7\u8bb0\u5f55\u7b49\u65b9\u6cd5\u3002\u4f7f\u7528print\u51fd [&hellip;]","protected":false},"author":3,"featured_media":958453,"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\/958446"}],"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=958446"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/958446\/revisions"}],"predecessor-version":[{"id":958455,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/958446\/revisions\/958455"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/958453"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=958446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=958446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=958446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}