{"id":974075,"date":"2024-12-27T06:02:14","date_gmt":"2024-12-26T22:02:14","guid":{"rendered":""},"modified":"2024-12-27T06:02:16","modified_gmt":"2024-12-26T22:02:16","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e6%89%93%e5%87%ba%e6%95%b4%e5%9e%8b","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/974075.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u6253\u51fa\u6574\u578b"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24195941\/fc04a57f-66bc-4c13-a59c-a4534b1a52f5.webp\" alt=\"python\u4e2d\u5982\u4f55\u6253\u51fa\u6574\u578b\" \/><\/p>\n<p><p> \u5728Python\u4e2d\uff0c<strong>\u6253\u5370\u6574\u578b\u7684\u65b9\u6cd5\u4e3b\u8981\u5305\u62ec\u76f4\u63a5\u4f7f\u7528print()\u51fd\u6570\u3001\u901a\u8fc7\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u8f93\u51fa\u3001\u4f7f\u7528f-string\u683c\u5f0f\u5316\u8f93\u51fa<\/strong>\u3002\u5176\u4e2d\uff0c\u6700\u4e3a\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u76f4\u63a5\u4f7f\u7528<code>print()<\/code>\u51fd\u6570\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u51e0\u79cd\u65b9\u6cd5\u4ee5\u53ca\u5b83\u4eec\u7684\u4f7f\u7528\u573a\u666f\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528print()\u51fd\u6570<\/p>\n<\/p>\n<p><p>\u4f7f\u7528<code>print()<\/code>\u51fd\u6570\u662fPython\u4e2d\u6700\u7b80\u5355\u76f4\u63a5\u7684\u8f93\u51fa\u65b9\u6cd5\u3002\u76f4\u63a5\u5c06\u6574\u6570\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9<code>print()<\/code>\u51fd\u6570\uff0c\u5373\u53ef\u5728\u63a7\u5236\u53f0\u6253\u5370\u51fa\u8be5\u6574\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">number = 42<\/p>\n<p>print(number)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u7b80\u5355\u7684\u6574\u6570\u8f93\u51fa\u573a\u666f\uff0c\u4ee3\u7801\u6e05\u6670\u6613\u61c2\uff0c\u9002\u5408\u521d\u5b66\u8005\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u8f93\u51fa<\/p>\n<\/p>\n<p><p>\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u8f93\u51fa\u63d0\u4f9b\u4e86\u66f4\u52a0\u7075\u6d3b\u7684\u65b9\u5f0f\u6765\u63a7\u5236\u8f93\u51fa\u683c\u5f0f\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u767e\u5206\u53f7<code>%<\/code>\u8fdb\u884c\u683c\u5f0f\u5316\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">number = 42<\/p>\n<p>print(&quot;The number is: %d&quot; % number)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u79cd\u65b9\u6cd5\u4e2d\uff0c<code>%d<\/code>\u662f\u4e00\u4e2a\u683c\u5f0f\u8bf4\u660e\u7b26\uff0c\u8868\u793a\u8f93\u51fa\u4e3a\u6574\u6570\u3002\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u8f93\u51fa\u9002\u7528\u4e8e\u9700\u8981\u5728\u5b57\u7b26\u4e32\u4e2d\u5d4c\u5165\u591a\u4e2a\u53d8\u91cf\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528f-string\u683c\u5f0f\u5316\u8f93\u51fa<\/p>\n<\/p>\n<p><p>Python 3.6\u5f15\u5165\u4e86f-string\u683c\u5f0f\u5316\u8f93\u51fa\u65b9\u5f0f\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u6d01\u7684\u65b9\u5f0f\u6765\u8fdb\u884c\u5b57\u7b26\u4e32\u63d2\u503c\u3002\u5728f-string\u4e2d\uff0c\u53ef\u4ee5\u76f4\u63a5\u5728\u5b57\u7b26\u4e32\u4e2d\u4f7f\u7528\u5927\u62ec\u53f7<code>{}<\/code>\u5305\u542b\u53d8\u91cf\u540d\uff0cPython\u4f1a\u5c06\u5176\u66ff\u6362\u4e3a\u53d8\u91cf\u7684\u503c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">number = 42<\/p>\n<p>print(f&quot;The number is: {number}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>f-string\u683c\u5f0f\u5316\u8f93\u51fa\u662f\u76ee\u524dPython\u4e2d\u63a8\u8350\u7684\u5b57\u7b26\u4e32\u683c\u5f0f\u5316\u65b9\u5f0f\uff0c\u56e0\u5176\u8bed\u6cd5\u7b80\u6d01\u3001\u53ef\u8bfb\u6027\u9ad8\uff0c\u9002\u7528\u4e8e\u5404\u79cd\u573a\u666f\u3002<\/p>\n<\/p>\n<hr>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u6df1\u5165\u63a2\u8ba8Python\u4e2d\u6574\u6570\u7684\u6253\u5370\u548c\u683c\u5f0f\u5316\u95ee\u9898\uff0c\u5305\u62ec\u5404\u79cd\u683c\u5f0f\u5316\u65b9\u5f0f\u7684\u5e94\u7528\u573a\u666f\u53ca\u5176\u4f18\u7f3a\u70b9\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528print()\u51fd\u6570\u6253\u5370\u6574\u578b<\/p>\n<\/p>\n<ol>\n<li>\u57fa\u672c\u7528\u6cd5<\/li>\n<\/ol>\n<p><p><code>print()<\/code>\u51fd\u6570\u662fPython\u4e2d\u6700\u5e38\u7528\u7684\u8f93\u51fa\u51fd\u6570\uff0c\u5176\u529f\u80fd\u662f\u5c06\u53c2\u6570\u8f93\u51fa\u5230\u63a7\u5236\u53f0\u3002\u5bf9\u4e8e\u6574\u578b\u6570\u636e\uff0c\u76f4\u63a5\u5c06\u6574\u6570\u53d8\u91cf\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9<code>print()<\/code>\u51fd\u6570\u5373\u53ef\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">number = 123<\/p>\n<p>print(number)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u5f0f\u7b80\u5355\u76f4\u89c2\uff0c\u9002\u5408\u7528\u4e8e\u8c03\u8bd5\u548c\u8f93\u51fa\u7b80\u5355\u7ed3\u679c\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u591a\u4e2a\u6574\u6570\u7684\u8f93\u51fa<\/li>\n<\/ol>\n<p><p>\u5f53\u9700\u8981\u540c\u65f6\u8f93\u51fa\u591a\u4e2a\u6574\u6570\u65f6\uff0c\u53ef\u4ee5\u5c06\u5b83\u4eec\u4f5c\u4e3a\u591a\u4e2a\u53c2\u6570\u4f20\u9012\u7ed9<code>print()<\/code>\u51fd\u6570\uff0c\u53c2\u6570\u4e4b\u95f4\u4ee5\u9017\u53f7\u5206\u9694\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">a = 10<\/p>\n<p>b = 20<\/p>\n<p>c = 30<\/p>\n<p>print(a, b, c)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>print()<\/code>\u51fd\u6570\u4f1a\u5728\u8f93\u51fa\u65f6\u81ea\u52a8\u5728\u6bcf\u4e2a\u53c2\u6570\u4e4b\u95f4\u63d2\u5165\u4e00\u4e2a\u7a7a\u683c\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li>\u63a7\u5236\u8f93\u51fa\u683c\u5f0f<\/li>\n<\/ol>\n<p><p><code>print()<\/code>\u51fd\u6570\u63d0\u4f9b\u4e86\u4e00\u4e9b\u53ef\u9009\u53c2\u6570\u6765\u63a7\u5236\u8f93\u51fa\u683c\u5f0f\uff0c\u5982<code>sep<\/code>\u548c<code>end<\/code>\u3002<\/p>\n<\/p>\n<ul>\n<li><code>sep<\/code>\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u591a\u4e2a\u53c2\u6570\u4e4b\u95f4\u7684\u5206\u9694\u7b26\uff0c\u9ed8\u8ba4\u662f\u7a7a\u683c\u3002<\/li>\n<li><code>end<\/code>\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u8f93\u51fa\u7ed3\u675f\u65f6\u7684\u5b57\u7b26\uff0c\u9ed8\u8ba4\u662f\u6362\u884c\u7b26\u3002<\/li>\n<\/ul>\n<p><pre><code class=\"language-python\">print(a, b, c, sep=&#39;, &#39;, end=&#39;.\\n&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u4f8b\u4e2d\uff0c\u8f93\u51fa\u7ed3\u679c\u4e3a<code>10, 20, 30.<\/code>\uff0c\u5404\u6574\u6570\u4e4b\u95f4\u7528\u9017\u53f7\u548c\u7a7a\u683c\u5206\u9694\uff0c\u8f93\u51fa\u7ed3\u675f\u65f6\u4ee5\u53e5\u53f7\u548c\u6362\u884c\u7b26\u7ed3\u675f\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u8f93\u51fa<\/p>\n<\/p>\n<ol>\n<li>\u767e\u5206\u53f7\u683c\u5f0f\u5316<\/li>\n<\/ol>\n<p><p>Python\u4e2d\u4f7f\u7528\u767e\u5206\u53f7<code>%<\/code>\u8fdb\u884c\u683c\u5f0f\u5316\u8f93\u51fa\u7684\u65b9\u5f0f\u7c7b\u4f3c\u4e8eC\u8bed\u8a00\u4e2d\u7684<code>printf<\/code>\u3002\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u4e2d\u4f7f\u7528<code>%<\/code>\u540e\u8ddf\u683c\u5f0f\u8bf4\u660e\u7b26\u6765\u8868\u793a\u53d8\u91cf\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">number = 42<\/p>\n<p>print(&quot;The answer is: %d&quot; % number)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5e38\u7528\u7684\u683c\u5f0f\u8bf4\u660e\u7b26\u5305\u62ec\uff1a<\/p>\n<\/p>\n<ul>\n<li><code>%d<\/code>\uff1a\u6574\u6570<\/li>\n<li><code>%f<\/code>\uff1a\u6d6e\u70b9\u6570<\/li>\n<li><code>%s<\/code>\uff1a\u5b57\u7b26\u4e32<\/li>\n<\/ul>\n<ol start=\"2\">\n<li>\u591a\u4e2a\u53d8\u91cf\u7684\u683c\u5f0f\u5316\u8f93\u51fa<\/li>\n<\/ol>\n<p><p>\u5f53\u9700\u8981\u683c\u5f0f\u5316\u8f93\u51fa\u591a\u4e2a\u53d8\u91cf\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e2a\u5305\u542b\u591a\u4e2a\u683c\u5f0f\u8bf4\u660e\u7b26\u7684\u5b57\u7b26\u4e32\uff0c\u5e76\u5c06\u591a\u4e2a\u53d8\u91cf\u4f5c\u4e3a\u4e00\u4e2a\u5143\u7ec4\u4f20\u9012\u7ed9<code>%<\/code>\u64cd\u4f5c\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">a = 10<\/p>\n<p>b = 20<\/p>\n<p>print(&quot;a = %d, b = %d&quot; % (a, b))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li>\u63a7\u5236\u8f93\u51fa\u683c\u5f0f<\/li>\n<\/ol>\n<p><p>\u767e\u5206\u53f7\u683c\u5f0f\u5316\u8fd8\u652f\u6301\u63a7\u5236\u8f93\u51fa\u683c\u5f0f\uff0c\u5982\u6307\u5b9a\u5bbd\u5ea6\u548c\u7cbe\u5ea6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">pi = 3.141592653589793<\/p>\n<p>print(&quot;Pi: %.2f&quot; % pi)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u4f8b\u4e2d\uff0c<code>%.2f<\/code>\u8868\u793a\u4ee5\u6d6e\u70b9\u6570\u5f62\u5f0f\u8f93\u51fa\uff0c\u4fdd\u7559\u4e24\u4f4d\u5c0f\u6570\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528f-string\u683c\u5f0f\u5316\u8f93\u51fa<\/p>\n<\/p>\n<ol>\n<li>\u57fa\u672c\u7528\u6cd5<\/li>\n<\/ol>\n<p><p>f-string\u662fPython 3.6\u5f15\u5165\u7684\u5b57\u7b26\u4e32\u683c\u5f0f\u5316\u65b9\u5f0f\uff0c\u5176\u8bed\u6cd5\u4e3a\u5728\u5b57\u7b26\u4e32\u524d\u52a0\u4e0a\u5b57\u6bcd<code>f<\/code>\u6216<code>F<\/code>\uff0c\u5e76\u5728\u5b57\u7b26\u4e32\u4e2d\u4f7f\u7528\u5927\u62ec\u53f7<code>{}<\/code>\u5305\u542b\u53d8\u91cf\u540d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">number = 42<\/p>\n<p>print(f&quot;The number is: {number}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u8868\u8fbe\u5f0f\u652f\u6301<\/li>\n<\/ol>\n<p><p>f-string\u4e0d\u4ec5\u652f\u6301\u53d8\u91cf\u63d2\u503c\uff0c\u8fd8\u652f\u6301\u5728\u5927\u62ec\u53f7\u5185\u8fdb\u884c\u7b80\u5355\u7684\u8868\u8fbe\u5f0f\u8ba1\u7b97\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">a = 10<\/p>\n<p>b = 20<\/p>\n<p>print(f&quot;The sum of a and b is: {a + b}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li>\u683c\u5f0f\u5316\u9009\u9879<\/li>\n<\/ol>\n<p><p>f-string\u652f\u6301\u683c\u5f0f\u5316\u9009\u9879\uff0c\u901a\u8fc7\u5728\u53d8\u91cf\u540d\u540e\u4f7f\u7528\u5192\u53f7<code>:<\/code>\u548c\u683c\u5f0f\u8bf4\u660e\u7b26\u8fdb\u884c\u6307\u5b9a\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">pi = 3.141592653589793<\/p>\n<p>print(f&quot;Pi: {pi:.2f}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u4f8b\u4e2d\uff0c<code>{pi:.2f}<\/code>\u8868\u793a\u4ee5\u6d6e\u70b9\u6570\u5f62\u5f0f\u8f93\u51fa<code>pi<\/code>\uff0c\u4fdd\u7559\u4e24\u4f4d\u5c0f\u6570\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c<strong>\u6253\u5370\u6574\u578b\u7684\u65b9\u6cd5\u591a\u79cd\u591a\u6837<\/strong>\u3002<code>print()<\/code>\u51fd\u6570\u662f\u6700\u57fa\u672c\u7684\u8f93\u51fa\u65b9\u5f0f\uff0c\u9002\u7528\u4e8e\u7b80\u5355\u7684\u8f93\u51fa\u573a\u666f\u3002\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u8f93\u51fa\u63d0\u4f9b\u4e86\u66f4\u7075\u6d3b\u7684\u683c\u5f0f\u63a7\u5236\uff0c\u9002\u5408\u9700\u8981\u5d4c\u5165\u591a\u4e2a\u53d8\u91cf\u7684\u590d\u6742\u573a\u666f\u3002f-string\u683c\u5f0f\u5316\u8f93\u51fa\u662fPython 3.6\u5f15\u5165\u7684\u65b0\u7279\u6027\uff0c\u8bed\u6cd5\u7b80\u6d01\u3001\u529f\u80fd\u5f3a\u5927\uff0c\u9010\u6e10\u6210\u4e3a\u4e3b\u6d41\u7684\u5b57\u7b26\u4e32\u683c\u5f0f\u5316\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684\u8f93\u51fa\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u548c\u4e2a\u4eba\u4e60\u60ef\u3002\u5bf9\u4e8e\u65b0\u624b\u800c\u8a00\uff0c\u5efa\u8bae\u4ece<code>print()<\/code>\u51fd\u6570\u548cf-string\u683c\u5f0f\u5316\u8f93\u51fa\u5165\u624b\uff0c\u8fd9\u4e24\u79cd\u65b9\u6cd5\u6613\u4e8e\u7406\u89e3\u4e14\u529f\u80fd\u5f3a\u5927\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5b9a\u4e49\u4e00\u4e2a\u6574\u578b\u53d8\u91cf\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5b9a\u4e49\u4e00\u4e2a\u6574\u578b\u53d8\u91cf\u975e\u5e38\u7b80\u5355\u3002\u4f60\u53ea\u9700\u4f7f\u7528\u8d4b\u503c\u8bed\u53e5\u5c06\u4e00\u4e2a\u6574\u6570\u8d4b\u7ed9\u4e00\u4e2a\u53d8\u91cf\u3002\u4f8b\u5982\uff0c<code>num = 10<\/code> \u5c31\u5b9a\u4e49\u4e86\u4e00\u4e2a\u6574\u578b\u53d8\u91cf<code>num<\/code>\uff0c\u5176\u503c\u4e3a10\u3002Python\u4f1a\u81ea\u52a8\u8bc6\u522b\u8fd9\u4e2a\u53d8\u91cf\u7684\u6570\u636e\u7c7b\u578b\u3002<\/p>\n<p><strong>Python\u4e2d\u6574\u578b\u7684\u8303\u56f4\u662f\u591a\u5c11\uff1f<\/strong><br \/>Python\u7684\u6574\u578b\u6ca1\u6709\u56fa\u5b9a\u7684\u8303\u56f4\u9650\u5236\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u53ef\u7528\u7684\u5185\u5b58\u3002\u4e0e\u5176\u4ed6\u7f16\u7a0b\u8bed\u8a00\u4e0d\u540c\uff0cPython\u7684\u6574\u578b\u53ef\u4ee5\u975e\u5e38\u5927\uff0c\u53ea\u8981\u7cfb\u7edf\u5185\u5b58\u5141\u8bb8\uff0c\u4f60\u53ef\u4ee5\u5b9a\u4e49\u975e\u5e38\u5927\u7684\u6574\u6570\uff0c\u4f8b\u5982<code>num = 123456789012345678901234567890<\/code>\u3002<\/p>\n<p><strong>\u5982\u4f55\u5c06\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u4e3a\u6574\u578b\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>int()<\/code>\u51fd\u6570\u5c06\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u4e3a\u6574\u578b\u3002\u4f8b\u5982\uff0c\u5c06\u4e00\u4e2a\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u578b\uff0c\u53ef\u4ee5\u4f7f\u7528<code>int(&quot;123&quot;)<\/code>\uff0c\u6b64\u65f6\u4f1a\u8fd4\u56de\u6574\u6570123\u3002\u5982\u679c\u8f6c\u6362\u7684\u5b57\u7b26\u4e32\u683c\u5f0f\u4e0d\u6b63\u786e\uff0c\u4f1a\u5f15\u53d1<code>ValueError<\/code>\u9519\u8bef\u3002\u5bf9\u4e8e\u6d6e\u70b9\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528<code>int(12.34)<\/code>\uff0c\u8fd9\u5c06\u8fd4\u56de12\uff0c\u81ea\u52a8\u53bb\u6389\u5c0f\u6570\u90e8\u5206\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u6253\u5370\u6574\u578b\u7684\u65b9\u6cd5\u4e3b\u8981\u5305\u62ec\u76f4\u63a5\u4f7f\u7528print()\u51fd\u6570\u3001\u901a\u8fc7\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u8f93\u51fa\u3001\u4f7f\u7528f-string [&hellip;]","protected":false},"author":3,"featured_media":974081,"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\/974075"}],"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=974075"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/974075\/revisions"}],"predecessor-version":[{"id":974084,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/974075\/revisions\/974084"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/974081"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=974075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=974075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=974075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}