{"id":994443,"date":"2024-12-27T08:55:29","date_gmt":"2024-12-27T00:55:29","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/994443.html"},"modified":"2024-12-27T08:55:32","modified_gmt":"2024-12-27T00:55:32","slug":"python%e5%a6%82%e4%bd%95%e5%8a%a0-%e5%8d%95%e5%bc%95%e5%8f%b7","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/994443.html","title":{"rendered":"python\u5982\u4f55\u52a0 \u5355\u5f15\u53f7"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25071424\/9202d754-1fc7-4af2-a752-c67d98dbaf32.webp\" alt=\"python\u5982\u4f55\u52a0 \u5355\u5f15\u53f7\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u7ed9\u5b57\u7b26\u4e32\u52a0\u4e0a\u5355\u5f15\u53f7\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5305\u62ec\u76f4\u63a5\u5728\u5b57\u7b26\u4e32\u4e2d\u4f7f\u7528\u5355\u5f15\u53f7\u3001\u5229\u7528\u8f6c\u4e49\u5b57\u7b26\u3001\u6216\u8005\u4f7f\u7528repr\u51fd\u6570\u7b49\u3002\u5728\u5904\u7406\u5305\u542b\u5355\u5f15\u53f7\u7684\u5b57\u7b26\u4e32\u65f6\uff0c\u8f6c\u4e49\u5b57\u7b26\u65b9\u6cd5\u5c24\u4e3a\u5e38\u7528\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u907f\u514d\u8bed\u6cd5\u9519\u8bef\u5e76\u4fdd\u6301\u5b57\u7b26\u4e32\u683c\u5f0f\u7684\u5b8c\u6574\u6027\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u5904\u7406\u5b57\u7b26\u4e32\u65f6\uff0c\u7ecf\u5e38\u9700\u8981\u5728\u5b57\u7b26\u4e32\u4e2d\u5305\u542b\u5355\u5f15\u53f7\u3002\u8fd9\u5728\u5904\u7406\u6587\u672c\u6570\u636e\u3001\u751f\u6210SQL\u67e5\u8be2\u6216\u5904\u7406JSON\u6570\u636e\u65f6\u5c24\u4e3a\u5e38\u89c1\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u8ba8\u8bba\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0\u5b57\u7b26\u4e32\u52a0\u5355\u5f15\u53f7\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u76f4\u63a5\u5728\u5b57\u7b26\u4e32\u4e2d\u4f7f\u7528\u5355\u5f15\u53f7<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u5b57\u7b26\u4e32\u53ef\u4ee5\u7528\u5355\u5f15\u53f7\u6216\u53cc\u5f15\u53f7\u5305\u56f4\uff0c\u8fd9\u5141\u8bb8\u5728\u5b57\u7b26\u4e32\u4e2d\u76f4\u63a5\u4f7f\u7528\u53e6\u4e00\u79cd\u5f15\u53f7\u800c\u4e0d\u9700\u8981\u8f6c\u4e49\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text = &quot;It&#39;s a beautiful day&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u53cc\u5f15\u53f7\u5305\u56f4\u5b57\u7b26\u4e32\uff0c\u4ece\u800c\u53ef\u4ee5\u5728\u5b57\u7b26\u4e32\u5185\u76f4\u63a5\u4f7f\u7528\u5355\u5f15\u53f7\u800c\u4e0d\u9700\u8981\u8f6c\u4e49\u3002\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u76f4\u89c2\uff0c\u975e\u5e38\u9002\u5408\u5904\u7406\u7b80\u5355\u7684\u6587\u672c\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u8f6c\u4e49\u5b57\u7b26<\/p>\n<\/p>\n<p><p>\u5f53\u9700\u8981\u5728\u5b57\u7b26\u4e32\u4e2d\u4f7f\u7528\u4e0e\u5916\u90e8\u5f15\u53f7\u76f8\u540c\u7684\u5f15\u53f7\u65f6\uff0c\u8f6c\u4e49\u5b57\u7b26\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u5de5\u5177\u3002\u901a\u8fc7\u5728\u5355\u5f15\u53f7\u524d\u52a0\u4e0a\u53cd\u659c\u6760\uff08\\\uff09\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u907f\u514d\u8bed\u6cd5\u9519\u8bef\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text = &#39;It\\&#39;s a beautiful day&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u91cc\uff0c\u53cd\u659c\u6760\u544a\u8bc9Python\uff0c\u63a5\u4e0b\u6765\u7684\u5355\u5f15\u53f7\u662f\u5b57\u7b26\u4e32\u7684\u4e00\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u5b57\u7b26\u4e32\u7684\u7ed3\u675f\u6807\u5fd7\u3002\u8fd9\u79cd\u65b9\u6cd5\u5728\u5904\u7406\u590d\u6742\u6587\u672c\u6570\u636e\u65f6\u975e\u5e38\u6709\u7528\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u5904\u7406\u4efb\u610f\u5f62\u5f0f\u7684\u5f15\u53f7\u5d4c\u5957\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528repr\u51fd\u6570<\/p>\n<\/p>\n<p><p>repr\u51fd\u6570\u662fPython\u5185\u5efa\u51fd\u6570\u4e4b\u4e00\uff0c\u5b83\u53ef\u4ee5\u8fd4\u56de\u4e00\u4e2a\u5bf9\u8c61\u7684\u201c\u5b98\u65b9\u201d\u5b57\u7b26\u4e32\u8868\u793a\u5f62\u5f0f\uff0c\u8fd9\u4e2a\u8868\u793a\u5f62\u5f0f\u53ef\u4ee5\u7528\u6765\u91cd\u65b0\u751f\u6210\u5bf9\u8c61\u3002\u5728\u5b57\u7b26\u4e32\u5904\u7406\u4e2d\uff0crepr\u51fd\u6570\u53ef\u4ee5\u81ea\u52a8\u4e3a\u5b57\u7b26\u4e32\u52a0\u4e0a\u5f15\u53f7\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text = &quot;It&#39;s a beautiful day&quot;<\/p>\n<p>quoted_text = repr(text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528repr\u51fd\u6570\u7684\u597d\u5904\u5728\u4e8e\uff0c\u5b83\u4e0d\u4ec5\u53ef\u4ee5\u4e3a\u5b57\u7b26\u4e32\u52a0\u4e0a\u5f15\u53f7\uff0c\u8fd8\u53ef\u4ee5\u5904\u7406\u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u6b8a\u5b57\u7b26\u548c\u8f6c\u4e49\u7b26\uff0c\u4f7f\u5176\u5728\u8f93\u51fa\u65f6\u4fdd\u6301\u539f\u6837\u3002\u8fd9\u5728\u8c03\u8bd5\u548c\u8bb0\u5f55\u65e5\u5fd7\u65f6\u7279\u522b\u6709\u7528\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u683c\u5f0f\u5316\u5b57\u7b26\u4e32<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u52a8\u6001\u6570\u636e\u65f6\uff0c\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u662f\u4e00\u79cd\u5e38\u7528\u7684\u6280\u5de7\u3002\u901a\u8fc7f-string\u6216str.format()\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5728\u5b57\u7b26\u4e32\u4e2d\u7075\u6d3b\u63d2\u5165\u53d8\u91cf\uff0c\u540c\u65f6\u4fdd\u7559\u5b57\u7b26\u4e32\u7684\u683c\u5f0f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">name = &quot;John&quot;<\/p>\n<p>text = f&quot;Hello, {name}!&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528f-string\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\uff0c\u5e76\u5728\u5176\u4e2d\u63d2\u5165\u53d8\u91cfname\u7684\u503c\u3002\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u7b80\u5316\u4e86\u4ee3\u7801\uff0c\u8fd8\u63d0\u9ad8\u4e86\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u5728SQL\u67e5\u8be2\u4e2d\u4f7f\u7528\u5355\u5f15\u53f7<\/p>\n<\/p>\n<p><p>\u5728\u751f\u6210SQL\u67e5\u8be2\u65f6\uff0c\u5355\u5f15\u53f7\u7528\u4e8e\u5305\u56f4\u5b57\u7b26\u4e32\u5e38\u91cf\u3002\u4e3a\u4e86\u786e\u4fddSQL\u8bed\u53e5\u7684\u6b63\u786e\u6027\u548c\u5b89\u5168\u6027\uff0c\u5e94\u8be5\u5bf9\u5b57\u7b26\u4e32\u8fdb\u884c\u9002\u5f53\u7684\u8f6c\u4e49\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">name = &quot;O&#39;Reilly&quot;<\/p>\n<p>query = f&quot;SELECT * FROM books WHERE author = &#39;{name}&#39;&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528f-string\u751f\u6210SQL\u67e5\u8be2\uff0c\u5e76\u624b\u52a8\u5904\u7406\u5b57\u7b26\u4e32\u4e2d\u7684\u5355\u5f15\u53f7\u3002\u8fd9\u79cd\u65b9\u6cd5\u867d\u7136\u7b80\u5355\uff0c\u4f46\u5bb9\u6613\u5f15\u53d1SQL\u6ce8\u5165\u653b\u51fb\uff0c\u56e0\u6b64\u5728\u5904\u7406\u7528\u6237\u8f93\u5165\u65f6\u5e94\u683c\u5916\u5c0f\u5fc3\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001JSON\u6570\u636e\u4e2d\u7684\u5355\u5f15\u53f7<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406JSON\u6570\u636e\u65f6\uff0c\u901a\u5e38\u4f7f\u7528\u53cc\u5f15\u53f7\u6765\u5305\u56f4\u952e\u548c\u503c\u3002\u7136\u800c\uff0c\u5728\u4e00\u4e9b\u7279\u5b9a\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u5c06\u5355\u5f15\u53f7\u8f6c\u6362\u4e3a\u53cc\u5f15\u53f7\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import json<\/p>\n<p>data = {&#39;name&#39;: &quot;O&#39;Reilly&quot;}<\/p>\n<p>json_data = json.dumps(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528json\u6a21\u5757\u5c06Python\u5b57\u5178\u8f6c\u6362\u4e3aJSON\u5b57\u7b26\u4e32\u3002json.dumps\u65b9\u6cd5\u4f1a\u81ea\u52a8\u5904\u7406\u5b57\u7b26\u4e32\u4e2d\u7684\u5f15\u53f7\u548c\u7279\u6b8a\u5b57\u7b26\uff0c\u4f7f\u5176\u7b26\u5408JSON\u683c\u5f0f\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u5904\u7406\u6587\u672c\u6587\u4ef6\u4e2d\u7684\u5355\u5f15\u53f7<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u6587\u672c\u6587\u4ef6\u65f6\uff0c\u53ef\u80fd\u9700\u8981\u8bfb\u53d6\u6216\u5199\u5165\u5305\u542b\u5355\u5f15\u53f7\u7684\u5b57\u7b26\u4e32\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u5185\u7f6e\u7684open\u51fd\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;file.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(&quot;It&#39;s a beautiful day&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528open\u51fd\u6570\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\uff0c\u5e76\u5c06\u5305\u542b\u5355\u5f15\u53f7\u7684\u5b57\u7b26\u4e32\u5199\u5165\u6587\u4ef6\u3002\u4f7f\u7528with\u8bed\u53e5\u53ef\u4ee5\u786e\u4fdd\u6587\u4ef6\u5728\u64cd\u4f5c\u5b8c\u6210\u540e\u88ab\u6b63\u786e\u5173\u95ed\uff0c\u4ece\u800c\u907f\u514d\u8d44\u6e90\u6cc4\u6f0f\u3002<\/p>\n<\/p>\n<p><p>\u516b\u3001\u5728HTML\u548cXML\u4e2d\u4f7f\u7528\u5355\u5f15\u53f7<\/p>\n<\/p>\n<p><p>\u5728\u751f\u6210HTML\u548cXML\u65f6\uff0c\u5355\u5f15\u53f7\u53ef\u4ee5\u7528\u4e8e\u5c5e\u6027\u503c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5e94\u786e\u4fdd\u5b57\u7b26\u4e32\u88ab\u6b63\u786e\u8f6c\u4e49\uff0c\u4ee5\u907f\u514d\u8bed\u6cd5\u9519\u8bef\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">html = &#39;&lt;a href=\\&#39;https:\/\/example.com\\&#39;&gt;Link&lt;\/a&gt;&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u5355\u5f15\u53f7\u5305\u56f4HTML\u5c5e\u6027\u503c\uff0c\u4ece\u800c\u907f\u514d\u4e0e\u5916\u90e8\u53cc\u5f15\u53f7\u7684\u51b2\u7a81\u3002\u8fd9\u79cd\u65b9\u6cd5\u5728\u5904\u7406\u52a8\u6001\u751f\u6210\u7684HTML\u548cXML\u65f6\u975e\u5e38\u6709\u7528\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u4fdd\u6301\u4ee3\u7801\u7684\u7b80\u6d01\u6027\u548c\u6613\u8bfb\u6027\u3002<\/p>\n<\/p>\n<p><p>\u4e5d\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u590d\u6742\u7684\u5b57\u7b26\u4e32\u64cd\u4f5c\u65f6\uff0c\u53ef\u80fd\u9700\u8981\u501f\u52a9\u7b2c\u4e09\u65b9\u5e93\u6765\u7b80\u5316\u5de5\u4f5c\u3002\u4f8b\u5982\uff0cPython\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u5e93re\u53ef\u4ee5\u7528\u4e8e\u67e5\u627e\u548c\u66ff\u6362\u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u5b9a\u6a21\u5f0f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>text = &quot;It&#39;s a beautiful day&quot;<\/p>\n<p>new_text = re.sub(r&quot;&#39;&quot;, &#39;&quot;&#39;, text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528re.sub\u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u5355\u5f15\u53f7\u66ff\u6362\u4e3a\u53cc\u5f15\u53f7\u3002\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u5f3a\u5927\u529f\u80fd\u4f7f\u5176\u5728\u5904\u7406\u590d\u6742\u7684\u5b57\u7b26\u4e32\u64cd\u4f5c\u65f6\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<p><p>\u5341\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u52a0\u5355\u5f15\u53f7\u7684\u65b9\u6cd5\u591a\u79cd\u591a\u6837\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u3002\u65e0\u8bba\u662f\u5904\u7406\u7b80\u5355\u7684\u6587\u672c\u6570\u636e\u3001\u751f\u6210SQL\u67e5\u8be2\uff0c\u8fd8\u662f\u5904\u7406JSON\u548cHTML\u6570\u636e\uff0c\u4e86\u89e3\u5e76\u638c\u63e1\u8fd9\u4e9b\u6280\u672f\u5c06\u6709\u52a9\u4e8e\u63d0\u9ad8\u4ee3\u7801\u7684\u5065\u58ee\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5e94\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u6700\u9002\u5408\u7684\u65b9\u6cd5\uff0c\u540c\u65f6\u6ce8\u610f\u5b89\u5168\u6027\u548c\u6027\u80fd\u95ee\u9898\u3002\u901a\u8fc7\u5408\u7406\u4f7f\u7528\u8fd9\u4e9b\u6280\u672f\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u51b3Python\u7f16\u7a0b\u4e2d\u6d89\u53ca\u7684\u5404\u79cd\u5b57\u7b26\u4e32\u5904\u7406\u95ee\u9898\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Python\u4e2d\u5982\u4f55\u5728\u5b57\u7b26\u4e32\u4e2d\u6dfb\u52a0\u5355\u5f15\u53f7\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u53cd\u659c\u6760\uff08\\\uff09\u6765\u8f6c\u4e49\u5355\u5f15\u53f7\uff0c\u4ece\u800c\u5728\u5b57\u7b26\u4e32\u4e2d\u5305\u542b\u5b83\u3002\u4f8b\u5982\uff1a<code>string_with_quote = &#39;It\\&#39;s a sunny day&#39;<\/code>\u3002\u8fd9\u6837\uff0c\u53cd\u659c\u6760\u544a\u8bc9Python\u5c06\u540e\u9762\u7684\u5355\u5f15\u53f7\u89c6\u4e3a\u5b57\u7b26\u4e32\u7684\u4e00\u90e8\u5206\uff0c\u800c\u4e0d\u662f\u5b57\u7b26\u4e32\u7684\u7ed3\u675f\u6807\u8bb0\u3002<\/p>\n<p><strong>Python\u4e2d\u7684\u5b57\u7b26\u4e32\u53ef\u4ee5\u4f7f\u7528\u54ea\u4e9b\u7c7b\u578b\u7684\u5f15\u53f7\uff1f<\/strong><br \/>Python\u652f\u6301\u4e09\u79cd\u7c7b\u578b\u7684\u5f15\u53f7\uff1a\u5355\u5f15\u53f7\uff08&#39;\uff09\u3001\u53cc\u5f15\u53f7\uff08&quot;\uff09\u548c\u4e09\u5f15\u53f7\uff08&#39;&#39;&#39; \u6216 &quot;&quot;&quot;\uff09\u3002\u4f7f\u7528\u53cc\u5f15\u53f7\u5305\u56f4\u7684\u5b57\u7b26\u4e32\u53ef\u4ee5\u76f4\u63a5\u5305\u542b\u5355\u5f15\u53f7\uff0c\u800c\u4f7f\u7528\u5355\u5f15\u53f7\u5305\u56f4\u7684\u5b57\u7b26\u4e32\u5219\u53ef\u4ee5\u76f4\u63a5\u5305\u542b\u53cc\u5f15\u53f7\u3002\u4f8b\u5982\uff1a<code>single_quote_string = &quot;He s<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>d, &#39;Hello&#39;&quot;<\/code>\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u521b\u5efa\u5305\u542b\u591a\u4e2a\u5355\u5f15\u53f7\u7684\u5b57\u7b26\u4e32\uff1f<\/strong><br \/>\u5982\u679c\u9700\u8981\u5728\u5b57\u7b26\u4e32\u4e2d\u5305\u542b\u591a\u4e2a\u5355\u5f15\u53f7\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u4e09\u5f15\u53f7\u6765\u5b9a\u4e49\u5b57\u7b26\u4e32\uff0c\u8fd9\u6837\u5c31\u4e0d\u9700\u8981\u8f6c\u4e49\u5355\u5f15\u53f7\u4e86\u3002\u4f8b\u5982\uff1a<code>multi_quote_string = &#39;&#39;&#39;It&#39;s a sunny day, and I&#39;m feeling great!&#39;&#39;&#39;<\/code>\u3002\u8fd9\u6837\u53ef\u4ee5\u8f7b\u677e\u5904\u7406\u5305\u542b\u591a\u4e2a\u5355\u5f15\u53f7\u7684\u6587\u672c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u7ed9\u5b57\u7b26\u4e32\u52a0\u4e0a\u5355\u5f15\u53f7\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5305\u62ec\u76f4\u63a5\u5728\u5b57\u7b26\u4e32\u4e2d\u4f7f\u7528\u5355\u5f15\u53f7\u3001\u5229\u7528\u8f6c\u4e49\u5b57\u7b26\u3001\u6216\u8005\u4f7f\u7528r [&hellip;]","protected":false},"author":3,"featured_media":994454,"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\/994443"}],"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=994443"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/994443\/revisions"}],"predecessor-version":[{"id":994459,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/994443\/revisions\/994459"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/994454"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=994443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=994443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=994443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}