{"id":1185916,"date":"2025-01-15T19:46:35","date_gmt":"2025-01-15T11:46:35","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1185916.html"},"modified":"2025-01-15T19:46:38","modified_gmt":"2025-01-15T11:46:38","slug":"python%e5%a6%82%e4%bd%95%e5%9b%9e%e8%bd%a6%e6%8d%a2%e8%a1%8c%e7%ac%a6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1185916.html","title":{"rendered":"python\u5982\u4f55\u56de\u8f66\u6362\u884c\u7b26"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25134906\/14facac0-95a5-4787-9ae3-03fb87b46115.webp\" alt=\"python\u5982\u4f55\u56de\u8f66\u6362\u884c\u7b26\" \/><\/p>\n<p><p> \u5728Python\u4e2d\uff0c\u5904\u7406\u56de\u8f66\u6362\u884c\u7b26\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528\u6362\u884c\u7b26<code>\\n<\/code>\u3001\u56de\u8f66\u7b26<code>\\r<\/code>\u3001\u4ee5\u53ca\u7ed3\u5408\u4f7f\u7528<code>\\r\\n<\/code>\u7b49\u3002\u8fd9\u4e9b\u7b26\u53f7\u53ef\u4ee5\u5728\u5b57\u7b26\u4e32\u4e2d\u76f4\u63a5\u4f7f\u7528\uff0c\u7528\u4e8e\u63a7\u5236\u6587\u672c\u7684\u683c\u5f0f\u548c\u663e\u793a\u3002<strong>\u53ef\u4ee5\u4f7f\u7528<code>\\n<\/code>\u6765\u8868\u793a\u6362\u884c\u3001\u4f7f\u7528<code>\\r<\/code>\u6765\u8868\u793a\u56de\u8f66\u3001\u4f7f\u7528<code>\\r\\n<\/code>\u6765\u8868\u793a\u56de\u8f66\u6362\u884c\u3002<\/strong> \u5176\u4e2d\uff0c<code>\\n<\/code>\u662f\u6700\u5e38\u7528\u7684\u6362\u884c\u7b26\uff0c\u9002\u7528\u4e8e\u5927\u591a\u6570\u64cd\u4f5c\u7cfb\u7edf\u548c\u573a\u666f\u3002\u8be6\u7ec6\u6765\u8bf4\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u65b9\u6cd5\u548c\u573a\u666f\uff1a<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528<code>\\n<\/code>\u8fdb\u884c\u6362\u884c<\/h3>\n<\/p>\n<p><p><code>\\n<\/code>\u662f\u65b0\u884c\u7b26\uff0c\u7528\u4e8e\u8868\u793a\u5728\u5f53\u524d\u6587\u672c\u4e2d\u63d2\u5165\u4e00\u4e2a\u65b0\u7684\u884c\u3002\u5b83\u5728\u5927\u591a\u6570\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u90fd\u80fd\u6b63\u5e38\u5de5\u4f5c\uff0c\u662f\u6700\u5e38\u89c1\u7684\u6362\u884c\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello\\nWorld&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u5c06\u8f93\u51fa\uff1a<\/p>\n<\/p>\n<p><pre><code>Hello<\/p>\n<p>World<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u91cc\uff0c<code>\\n<\/code>\u4f7f\u5f97\u201cHello\u201d\u548c\u201cWorld\u201d\u5206\u522b\u51fa\u73b0\u5728\u4e0d\u540c\u7684\u884c\u4e0a\u3002<code>print<\/code>\u51fd\u6570\u5728\u672b\u5c3e\u9ed8\u8ba4\u4f1a\u6dfb\u52a0\u4e00\u4e2a\u6362\u884c\u7b26\uff0c\u56e0\u6b64\u4f60\u4e0d\u9700\u8981\u624b\u52a8\u6dfb\u52a0\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528<code>\\r<\/code>\u8fdb\u884c\u56de\u8f66<\/h3>\n<\/p>\n<p><p><code>\\r<\/code>\u662f\u56de\u8f66\u7b26\uff0c\u901a\u5e38\u7528\u4e8e\u5c06\u5149\u6807\u79fb\u56de\u5230\u5f53\u524d\u884c\u7684\u5f00\u5934\u3002\u5b83\u5728\u67d0\u4e9b\u7279\u5b9a\u7684\u5e94\u7528\u7a0b\u5e8f\u548c\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u6709\u7279\u6b8a\u7528\u9014\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello\\rWorld&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u5c06\u8f93\u51fa\uff1a<\/p>\n<\/p>\n<p><pre><code>World<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u91cc\uff0c<code>\\r<\/code>\u5c06\u5149\u6807\u79fb\u56de\u5230\u884c\u7684\u5f00\u5934\uff0c\u7136\u540e\u201cWorld\u201d\u8986\u76d6\u4e86\u201cHello\u201d\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528<code>\\r\\n<\/code>\u8fdb\u884c\u56de\u8f66\u6362\u884c<\/h3>\n<\/p>\n<p><p><code>\\r\\n<\/code>\u662f\u56de\u8f66\u6362\u884c\u7b26\uff0c\u901a\u5e38\u5728Windows\u7cfb\u7edf\u4e2d\u4f7f\u7528\uff0c\u7528\u4e8e\u8868\u793a\u5728\u5f53\u524d\u6587\u672c\u4e2d\u63d2\u5165\u4e00\u4e2a\u65b0\u7684\u884c\u5e76\u5c06\u5149\u6807\u79fb\u5230\u884c\u7684\u5f00\u5934\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello\\r\\nWorld&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u5c06\u8f93\u51fa\uff1a<\/p>\n<\/p>\n<p><pre><code>Hello<\/p>\n<p>World<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u91cc\uff0c<code>\\r\\n<\/code>\u4f7f\u5f97\u201cHello\u201d\u548c\u201cWorld\u201d\u5206\u522b\u51fa\u73b0\u5728\u4e0d\u540c\u7684\u884c\u4e0a\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u6587\u4ef6\u64cd\u4f5c\u4e2d\u7684\u6362\u884c\u7b26\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5728\u6587\u4ef6\u64cd\u4f5c\u4e2d\uff0c\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u5bf9\u6362\u884c\u7b26\u7684\u5904\u7406\u65b9\u5f0f\u6709\u6240\u4e0d\u540c\u3002Python\u63d0\u4f9b\u4e86\u8de8\u5e73\u53f0\u7684\u6587\u4ef6\u64cd\u4f5c\u65b9\u6cd5\uff0c\u53ef\u4ee5\u81ea\u52a8\u5904\u7406\u4e0d\u540c\u7cfb\u7edf\u7684\u6362\u884c\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(&quot;Hello\\nWorld&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u5c06\u5728\u6587\u4ef6\u4e2d\u5199\u5165\uff1a<\/p>\n<\/p>\n<p><pre><code>Hello<\/p>\n<p>World<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>Python\u4f1a\u81ea\u52a8\u5904\u7406\u6362\u884c\u7b26\uff0c\u4f7f\u5176\u9002\u5e94\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u3002\u5728\u8bfb\u53d6\u6587\u4ef6\u65f6\uff0cPython\u4e5f\u4f1a\u81ea\u52a8\u5c06\u4e0d\u540c\u7684\u6362\u884c\u7b26\u8f6c\u6362\u4e3a<code>\\n<\/code>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    content = file.read()<\/p>\n<p>    print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u8de8\u5e73\u53f0\u5904\u7406\u6362\u884c\u7b26<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u786e\u4fdd\u4ee3\u7801\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u90fd\u80fd\u6b63\u5e38\u8fd0\u884c\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u6a21\u5757<code>os<\/code>\u6765\u5904\u7406\u6362\u884c\u7b26\u3002<code>os.linesep<\/code>\u63d0\u4f9b\u4e86\u5f53\u524d\u64cd\u4f5c\u7cfb\u7edf\u7684\u6362\u884c\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>with open(&#39;example.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(f&quot;Hello{os.linesep}World&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u5c06\u5728\u6587\u4ef6\u4e2d\u5199\u5165\uff1a<\/p>\n<\/p>\n<p><pre><code>Hello<\/p>\n<p>World<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528<code>os.linesep<\/code>\u786e\u4fdd\u4e86\u6362\u884c\u7b26\u7684\u8de8\u5e73\u53f0\u517c\u5bb9\u6027\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u5b57\u7b26\u4e32\u64cd\u4f5c\u4e2d\u7684\u6362\u884c\u7b26\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5728\u5b57\u7b26\u4e32\u64cd\u4f5c\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u65b9\u6cd5\u6765\u5904\u7406\u6362\u884c\u7b26\u3002\u4f8b\u5982\uff0c<code>splitlines()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u6309\u884c\u5206\u5272\uff0c\u8fd4\u56de\u4e00\u4e2a\u5305\u542b\u5404\u884c\u7684\u5217\u8868\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text = &quot;Hello\\nWorld&quot;<\/p>\n<p>lines = text.splitlines()<\/p>\n<p>print(lines)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u5c06\u8f93\u51fa\uff1a<\/p>\n<\/p>\n<p><pre><code>[&#39;Hello&#39;, &#39;World&#39;]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>splitlines()<\/code>\u65b9\u6cd5\u81ea\u52a8\u5904\u7406\u4e0d\u540c\u7684\u6362\u884c\u7b26\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u5217\u8868\u4e2d\u7684\u5143\u7d20\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u4e2d\u7684\u6362\u884c\u7b26\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5728\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u6587\u672c\u5339\u914d\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u7279\u6b8a\u5b57\u7b26\u6765\u5339\u914d\u6362\u884c\u7b26\u3002\u4f8b\u5982\uff0c<code>\\n<\/code>\u53ef\u4ee5\u5339\u914d\u6362\u884c\u7b26\uff0c<code>^<\/code>\u548c<code>$<\/code>\u53ef\u4ee5\u5206\u522b\u5339\u914d\u884c\u7684\u5f00\u5934\u548c\u7ed3\u5c3e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>text = &quot;Hello\\nWorld&quot;<\/p>\n<p>pattern = re.compile(r&#39;^World$&#39;, re.MULTILINE)<\/p>\n<p>match = pattern.search(text)<\/p>\n<p>print(match.group())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u5c06\u8f93\u51fa\uff1a<\/p>\n<\/p>\n<p><pre><code>World<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u91cc\uff0c<code>re.MULTILINE<\/code>\u6807\u5fd7\u4f7f\u5f97<code>^<\/code>\u548c<code>$<\/code>\u53ef\u4ee5\u5339\u914d\u6bcf\u4e00\u884c\u7684\u5f00\u5934\u548c\u7ed3\u5c3e\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u6574\u4e2a\u5b57\u7b26\u4e32\u7684\u5f00\u5934\u548c\u7ed3\u5c3e\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u66ff\u6362\u6362\u884c\u7b26<\/h3>\n<\/p>\n<p><p>\u5728\u5b57\u7b26\u4e32\u64cd\u4f5c\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>replace()<\/code>\u65b9\u6cd5\u6765\u66ff\u6362\u6362\u884c\u7b26\u3002\u4f8b\u5982\uff0c\u5c06\u6240\u6709\u7684<code>\\n<\/code>\u66ff\u6362\u4e3a<code>\\r\\n<\/code>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text = &quot;Hello\\nWorld&quot;<\/p>\n<p>new_text = text.replace(&quot;\\n&quot;, &quot;\\r\\n&quot;)<\/p>\n<p>print(new_text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u5c06\u8f93\u51fa\uff1a<\/p>\n<\/p>\n<p><pre><code>Hello<\/p>\n<p>World<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u91cc\uff0c<code>replace()<\/code>\u65b9\u6cd5\u5c06\u6240\u6709\u7684<code>\\n<\/code>\u66ff\u6362\u4e3a<code>\\r\\n<\/code>\u3002<\/p>\n<\/p>\n<p><h3>\u4e5d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u5904\u7406\u56de\u8f66\u6362\u884c\u7b26\u7684\u65b9\u6cd5\u591a\u79cd\u591a\u6837\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002<strong>\u4f7f\u7528<code>\\n<\/code>\u8fdb\u884c\u6362\u884c\u3001\u4f7f\u7528<code>\\r<\/code>\u8fdb\u884c\u56de\u8f66\u3001\u4f7f\u7528<code>\\r\\n<\/code>\u8fdb\u884c\u56de\u8f66\u6362\u884c\u3001\u5728\u6587\u4ef6\u64cd\u4f5c\u4e2d\u81ea\u52a8\u5904\u7406\u6362\u884c\u7b26\u3001\u8de8\u5e73\u53f0\u5904\u7406\u6362\u884c\u7b26\u3001\u5b57\u7b26\u4e32\u64cd\u4f5c\u4e2d\u7684\u6362\u884c\u7b26\u5904\u7406\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u4e2d\u7684\u6362\u884c\u7b26\u5904\u7406\u3001\u66ff\u6362\u6362\u884c\u7b26\u7b49\u65b9\u6cd5\u90fd\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u51b3\u4e0d\u540c\u573a\u666f\u4e0b\u7684\u6362\u884c\u7b26\u95ee\u9898\u3002<\/strong> \u901a\u8fc7\u7075\u6d3b\u8fd0\u7528\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u786e\u4fdd\u4ee3\u7801\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u548c\u5e94\u7528\u573a\u666f\u4e0b\u90fd\u80fd\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4f7f\u7528\u56de\u8f66\u548c\u6362\u884c\u7b26\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u8f6c\u4e49\u5b57\u7b26<code>\\n<\/code>\u8868\u793a\u6362\u884c\u7b26\uff0c<code>\\r<\/code>\u8868\u793a\u56de\u8f66\u7b26\u3002\u5728\u5b57\u7b26\u4e32\u4e2d\u76f4\u63a5\u4f7f\u7528\u8fd9\u4e9b\u5b57\u7b26\uff0c\u53ef\u4ee5\u5b9e\u73b0\u6587\u672c\u7684\u6362\u884c\u548c\u56de\u8f66\u3002\u4f8b\u5982\uff0c<code>print(&quot;Hello\\nWorld&quot;)<\/code>\u5c06\u8f93\u51fa\uff1a  <\/p>\n<pre><code>Hello\nWorld\n<\/code><\/pre>\n<p>\u8fd9\u6837\u53ef\u4ee5\u5728\u63a7\u5236\u53f0\u4e2d\u663e\u793a\u591a\u4e2a\u884c\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u8bfb\u53d6\u5305\u542b\u6362\u884c\u7b26\u7684\u6587\u672c\u6587\u4ef6\uff1f<\/strong><br \/>\u8bfb\u53d6\u6587\u672c\u6587\u4ef6\u65f6\uff0cPython\u4f1a\u81ea\u52a8\u5904\u7406\u6362\u884c\u7b26\u3002\u53ef\u4ee5\u4f7f\u7528<code>open()<\/code>\u51fd\u6570\u7ed3\u5408<code>read()<\/code>\u6216<code>readlines()<\/code>\u65b9\u6cd5\u6765\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:\n    content = file.read()\nprint(content)\n<\/code><\/pre>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u4f1a\u5c06\u6587\u4ef6\u4e2d\u7684\u6240\u6709\u5185\u5bb9\u8bfb\u53d6\u5e76\u6253\u5370\uff0c\u5176\u4e2d\u7684\u6362\u884c\u7b26\u4f1a\u88ab\u4fdd\u7559\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u5b57\u7b26\u4e32\u4e2d\u63d2\u5165\u6362\u884c\u7b26\u4ee5\u683c\u5f0f\u5316\u8f93\u51fa\uff1f<\/strong><br \/>\u901a\u8fc7\u4f7f\u7528\u6362\u884c\u7b26\uff0c\u53ef\u4ee5\u5728\u5b57\u7b26\u4e32\u4e2d\u521b\u5efa\u66f4\u6e05\u6670\u7684\u8f93\u51fa\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u591a\u884c\u5b57\u7b26\u4e32<code>&#39;&#39;&#39;<\/code>\u6216<code>&quot;&quot;&quot;<\/code>\u53ef\u4ee5\u8f7b\u677e\u63d2\u5165\u6362\u884c\u7b26\u3002\u5982\u4e0b\u6240\u793a\uff1a  <\/p>\n<pre><code class=\"language-python\">message = &quot;&quot;&quot;Hello,\nThis is a message\nthat spans multiple lines.&quot;&quot;&quot;\nprint(message)\n<\/code><\/pre>\n<p>\u8fd9\u6837\u53ef\u4ee5\u4f7f\u4ee3\u7801\u66f4\u6574\u6d01\uff0c\u5e76\u63d0\u9ad8\u53ef\u8bfb\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u5904\u7406\u56de\u8f66\u6362\u884c\u7b26\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528\u6362\u884c\u7b26\\n\u3001\u56de\u8f66\u7b26\\r\u3001\u4ee5\u53ca\u7ed3\u5408\u4f7f\u7528\\r\\n\u7b49\u3002\u8fd9\u4e9b [&hellip;]","protected":false},"author":3,"featured_media":1185927,"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\/1185916"}],"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=1185916"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1185916\/revisions"}],"predecessor-version":[{"id":1185929,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1185916\/revisions\/1185929"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1185927"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1185916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1185916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1185916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}