{"id":1059589,"date":"2024-12-31T15:26:21","date_gmt":"2024-12-31T07:26:21","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1059589.html"},"modified":"2024-12-31T15:26:24","modified_gmt":"2024-12-31T07:26:24","slug":"python%e5%a6%82%e4%bd%95%e5%b0%86%e6%b1%89%e5%ad%97%e8%bd%ac%e6%8d%a2%e4%b8%ba%e5%ad%97%e7%ac%a6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1059589.html","title":{"rendered":"python\u5982\u4f55\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u5b57\u7b26"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/1e14dc30-bd30-4838-ae86-36ad11fddc64.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u5b57\u7b26\" \/><\/p>\n<p><p> \u5728Python\u4e2d\uff0c\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u5b57\u7b26\uff1a\u4f7f\u7528Unicode\u7f16\u7801\u3001\u4f7f\u7528\u62fc\u97f3\u5e93\u3001\u4f7f\u7528\u6c49\u5b57\u8f6c\u62fc\u97f3\u5e93\u7b49\u3002<strong>\u4f7f\u7528Unicode\u7f16\u7801\u3001\u4f7f\u7528\u62fc\u97f3\u5e93\u3001\u4f7f\u7528\u6c49\u5b57\u8f6c\u62fc\u97f3\u5e93<\/strong>\u3002\u5176\u4e2d\uff0c\u4f7f\u7528Unicode\u7f16\u7801\u662f\u4e00\u79cd\u975e\u5e38\u57fa\u672c\u4e14\u901a\u7528\u7684\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u5176\u5bf9\u5e94\u7684Unicode\u5b57\u7b26\u7f16\u7801\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u8ba8\u8bba\u8fd9\u4e9b\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528Unicode\u7f16\u7801<\/h3>\n<\/p>\n<p><p>Unicode\u7f16\u7801\u662f\u4e00\u79cd\u901a\u7528\u7684\u5b57\u7b26\u7f16\u7801\u6807\u51c6\uff0c\u5b83\u4e3a\u6bcf\u4e2a\u5b57\u7b26\u5206\u914d\u4e00\u4e2a\u552f\u4e00\u7684\u7f16\u7801\u3002Python\u63d0\u4f9b\u4e86\u5185\u7f6e\u7684<code>ord()<\/code>\u548c<code>chr()<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u5b57\u7b26\u4e0eUnicode\u7f16\u7801\u4e4b\u95f4\u7684\u8f6c\u6362\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528ord()\u548cchr()\u51fd\u6570<\/h4>\n<\/p>\n<p><p><code>ord()<\/code>\u51fd\u6570\u7528\u4e8e\u5c06\u4e00\u4e2a\u5b57\u7b26\u8f6c\u6362\u4e3a\u5176\u5bf9\u5e94\u7684Unicode\u7f16\u7801\uff0c\u800c<code>chr()<\/code>\u51fd\u6570\u5219\u7528\u4e8e\u5c06Unicode\u7f16\u7801\u8f6c\u6362\u4e3a\u5bf9\u5e94\u7684\u5b57\u7b26\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5c06\u6c49\u5b57\u8f6c\u6362\u4e3aUnicode\u7f16\u7801<\/p>\n<p>chinese_char = &#39;\u6c49&#39;<\/p>\n<p>unicode_code = ord(chinese_char)<\/p>\n<p>print(f&quot;&#39;{chinese_char}&#39; \u7684 Unicode \u7f16\u7801\u662f: {unicode_code}&quot;)<\/p>\n<h2><strong>\u5c06Unicode\u7f16\u7801\u8f6c\u6362\u4e3a\u6c49\u5b57<\/strong><\/h2>\n<p>unicode_code = 27721<\/p>\n<p>chinese_char = chr(unicode_code)<\/p>\n<p>print(f&quot;Unicode \u7f16\u7801 {unicode_code} \u5bf9\u5e94\u7684\u6c49\u5b57\u662f: &#39;{chinese_char}&#39;&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u4f7f\u7528<code>ord()<\/code>\u51fd\u6570\u5c06\u6c49\u5b57&#39;\u6c49&#39;\u8f6c\u6362\u4e3a\u5176\u5bf9\u5e94\u7684Unicode\u7f16\u780127721\uff0c\u7136\u540e\u4f7f\u7528<code>chr()<\/code>\u51fd\u6570\u5c06Unicode\u7f16\u780127721\u8f6c\u6362\u56de\u6c49\u5b57&#39;\u6c49&#39;\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u62fc\u97f3\u5e93<\/h3>\n<\/p>\n<p><p>\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u9700\u6c42\uff0c\u7279\u522b\u662f\u5728\u5904\u7406\u4e2d\u6587\u6587\u672c\u65f6\u3002Python\u4e2d\u6709\u51e0\u4e2a\u5e93\u53ef\u4ee5\u7528\u6765\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\uff0c\u4f8b\u5982<code>pypinyin<\/code>\u5e93\u3002<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5pypinyin\u5e93<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5<code>pypinyin<\/code>\u5e93\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u8be5\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pypinyin<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528pypinyin\u5e93\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>pypinyin<\/code>\u5e93\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pypinyin import pinyin, Style<\/p>\n<h2><strong>\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3<\/strong><\/h2>\n<p>chinese_text = &#39;\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3&#39;<\/p>\n<p>pinyin_list = pinyin(chinese_text, style=Style.TONE3)<\/p>\n<p>pinyin_text = &#39; &#39;.join([item[0] for item in pinyin_list])<\/p>\n<p>print(f&quot;&#39;{chinese_text}&#39; \u8f6c\u6362\u4e3a\u62fc\u97f3\u662f: {pinyin_text}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>pinyin<\/code>\u51fd\u6570\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\uff0c\u5e76\u4f7f\u7528<code>join()<\/code>\u51fd\u6570\u5c06\u62fc\u97f3\u5217\u8868\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u3002<code>Style.TONE3<\/code>\u8868\u793a\u4f7f\u7528\u5e26\u58f0\u8c03\u7684\u62fc\u97f3\u6837\u5f0f\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u6c49\u5b57\u8f6c\u62fc\u97f3\u5e93<\/h3>\n<\/p>\n<p><p>\u9664\u4e86<code>pypinyin<\/code>\u5e93\uff0c\u8fd8\u6709\u5176\u4ed6\u4e00\u4e9b\u5e93\u53ef\u4ee5\u7528\u6765\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\uff0c\u4f8b\u5982<code>xpinyin<\/code>\u5e93\u3002<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5xpinyin\u5e93<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5<code>xpinyin<\/code>\u5e93\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u8be5\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install xpinyin<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528xpinyin\u5e93\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>xpinyin<\/code>\u5e93\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from xpinyin import Pinyin<\/p>\n<h2><strong>\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3<\/strong><\/h2>\n<p>chinese_text = &#39;\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3&#39;<\/p>\n<p>pinyin = Pinyin()<\/p>\n<p>pinyin_text = pinyin.get_pinyin(chinese_text, &#39; &#39;)<\/p>\n<p>print(f&quot;&#39;{chinese_text}&#39; \u8f6c\u6362\u4e3a\u62fc\u97f3\u662f: {pinyin_text}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>Pinyin<\/code>\u7c7b\u7684<code>get_pinyin<\/code>\u65b9\u6cd5\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\uff0c\u5e76\u4f7f\u7528\u7a7a\u683c\u4f5c\u4e3a\u62fc\u97f3\u4e4b\u95f4\u7684\u5206\u9694\u7b26\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u5176\u4ed6\u5f62\u5f0f\u7684\u5b57\u7b26<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3aUnicode\u7f16\u7801\u6216\u62fc\u97f3\uff0c\u6709\u65f6\u8fd8\u9700\u8981\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u5176\u4ed6\u5f62\u5f0f\u7684\u5b57\u7b26\u3002\u4f8b\u5982\uff0c\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u7b80\u4f53\u6216\u7e41\u4f53\uff0c\u6216\u8005\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\u9996\u5b57\u6bcd\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528opencc\u5e93\u5c06\u7b80\u4f53\u6c49\u5b57\u8f6c\u6362\u4e3a\u7e41\u4f53\u6c49\u5b57<\/h4>\n<\/p>\n<p><p><code>opencc<\/code>\u5e93\u53ef\u4ee5\u7528\u6765\u8fdb\u884c\u7b80\u7e41\u4f53\u6c49\u5b57\u8f6c\u6362\u3002\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5<code>opencc<\/code>\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install opencc-python-reimplemented<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>opencc<\/code>\u5e93\u5c06\u7b80\u4f53\u6c49\u5b57\u8f6c\u6362\u4e3a\u7e41\u4f53\u6c49\u5b57\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import opencc<\/p>\n<h2><strong>\u5c06\u7b80\u4f53\u6c49\u5b57\u8f6c\u6362\u4e3a\u7e41\u4f53\u6c49\u5b57<\/strong><\/h2>\n<p>converter = opencc.OpenCC(&#39;s2t&#39;)  # s2t\u8868\u793a\u7b80\u4f53\u8f6c\u7e41\u4f53<\/p>\n<p>simplified_text = &#39;\u6c49\u5b57\u8f6c\u6362\u4e3a\u7e41\u4f53&#39;<\/p>\n<p>traditional_text = converter.convert(simplified_text)<\/p>\n<p>print(f&quot;&#39;{simplified_text}&#39; \u8f6c\u6362\u4e3a\u7e41\u4f53\u662f: {traditional_text}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>OpenCC<\/code>\u7c7b\u7684<code>convert<\/code>\u65b9\u6cd5\u5c06\u7b80\u4f53\u6c49\u5b57\u8f6c\u6362\u4e3a\u7e41\u4f53\u6c49\u5b57\u3002<\/p>\n<\/p>\n<p><h4>2. \u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\u9996\u5b57\u6bcd<\/h4>\n<\/p>\n<p><p>\u6709\u65f6\u6211\u4eec\u53ea\u9700\u8981\u83b7\u53d6\u6c49\u5b57\u7684\u62fc\u97f3\u9996\u5b57\u6bcd\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>pypinyin<\/code>\u5e93\u6765\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pypinyin import lazy_pinyin, Style<\/p>\n<h2><strong>\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\u9996\u5b57\u6bcd<\/strong><\/h2>\n<p>chinese_text = &#39;\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\u9996\u5b57\u6bcd&#39;<\/p>\n<p>initials = lazy_pinyin(chinese_text, style=Style.FIRST_LETTER)<\/p>\n<p>initials_text = &#39;&#39;.join(initials)<\/p>\n<p>print(f&quot;&#39;{chinese_text}&#39; \u8f6c\u6362\u4e3a\u62fc\u97f3\u9996\u5b57\u6bcd\u662f: {initials_text}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>lazy_pinyin<\/code>\u51fd\u6570\u548c<code>Style.FIRST_LETTER<\/code>\u6837\u5f0f\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u62fc\u97f3\u9996\u5b57\u6bcd\uff0c\u5e76\u4f7f\u7528<code>join()<\/code>\u51fd\u6570\u5c06\u9996\u5b57\u6bcd\u5217\u8868\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><h3>\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u672c\u6587\uff0c\u6211\u4eec\u8be6\u7ec6\u8ba8\u8bba\u4e86\u5728Python\u4e2d\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u5b57\u7b26\u7684\u51e0\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528Unicode\u7f16\u7801\u3001\u4f7f\u7528\u62fc\u97f3\u5e93\u3001\u4f7f\u7528\u6c49\u5b57\u8f6c\u62fc\u97f3\u5e93\u4ee5\u53ca\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u5176\u4ed6\u5f62\u5f0f\u7684\u5b57\u7b26\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u9002\u7528\u7684\u573a\u666f\u548c\u4f18\u7f3a\u70b9\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u6765\u5904\u7406\u6c49\u5b57\u8f6c\u6362\u95ee\u9898\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u5b57\u7b26\u7f16\u7801\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>ord()<\/code>\u51fd\u6570\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u5176\u5bf9\u5e94\u7684\u5b57\u7b26\u7f16\u7801\u3002<code>ord()<\/code>\u63a5\u53d7\u4e00\u4e2a\u5b57\u7b26\u4e32\u53c2\u6570\uff0c\u8fd4\u56de\u8be5\u5b57\u7b26\u7684Unicode\u7801\u70b9\u3002\u4f8b\u5982\uff0c<code>ord(&#39;\u6c49&#39;)<\/code>\u5c06\u8fd4\u56de\u6c49\u5b57\u201c\u6c49\u201d\u7684Unicode\u7f16\u7801\u503c\u3002\u53ef\u4ee5\u901a\u8fc7\u6b64\u65b9\u5f0f\u83b7\u53d6\u6c49\u5b57\u7684\u5b57\u7b26\u7f16\u7801\u3002<\/p>\n<p><strong>Python\u4e2d\u662f\u5426\u6709\u5e93\u53ef\u4ee5\u7b80\u5316\u6c49\u5b57\u8f6c\u6362\u4e3a\u5b57\u7b26\u7684\u8fc7\u7a0b\uff1f<\/strong><br \/>\u662f\u7684\uff0cPython\u4e2d\u6709\u591a\u4e2a\u5e93\u53ef\u4ee5\u5e2e\u52a9\u7b80\u5316\u6c49\u5b57\u8f6c\u6362\u7684\u8fc7\u7a0b\uff0c\u4f8b\u5982<code>chardet<\/code>\u548c<code>codecs<\/code>\u5e93\u3002\u8fd9\u4e9b\u5e93\u53ef\u4ee5\u5e2e\u52a9\u8bc6\u522b\u548c\u8f6c\u6362\u4e0d\u540c\u7f16\u7801\u7684\u5b57\u7b26\u3002\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\uff0c\u7528\u6237\u53ef\u4ee5\u66f4\u65b9\u4fbf\u5730\u5904\u7406\u6c49\u5b57\u548c\u5176\u4ed6\u5b57\u7b26\u4e4b\u95f4\u7684\u8f6c\u6362\uff0c\u800c\u65e0\u9700\u624b\u52a8\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406Python\u4e2d\u6c49\u5b57\u8f6c\u6362\u540e\u51fa\u73b0\u7684\u4e71\u7801\u95ee\u9898\uff1f<\/strong><br \/>\u4e71\u7801\u95ee\u9898\u901a\u5e38\u662f\u7531\u4e8e\u7f16\u7801\u4e0d\u5339\u914d\u9020\u6210\u7684\u3002\u5728\u8fdb\u884c\u6c49\u5b57\u8f6c\u6362\u65f6\uff0c\u786e\u4fdd\u4f7f\u7528\u6b63\u786e\u7684\u7f16\u7801\u683c\u5f0f\uff0c\u5982UTF-8\u6216GBK\u3002\u5982\u679c\u9047\u5230\u4e71\u7801\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528<code>encode()<\/code>\u548c<code>decode()<\/code>\u65b9\u6cd5\u6765\u660e\u786e\u6307\u5b9a\u7f16\u7801\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>string.encode(&#39;utf-8&#39;)<\/code>\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3aUTF-8\u5b57\u8282\u4e32\uff0c\u4f7f\u7528<code>bytes.decode(&#39;utf-8&#39;)<\/code>\u5c06\u5176\u8fd8\u539f\u4e3a\u5b57\u7b26\u4e32\uff0c\u8fd9\u6837\u53ef\u4ee5\u6709\u6548\u907f\u514d\u4e71\u7801\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5c06\u6c49\u5b57\u8f6c\u6362\u4e3a\u5b57\u7b26\uff1a\u4f7f\u7528Unicode\u7f16\u7801\u3001\u4f7f\u7528\u62fc\u97f3\u5e93\u3001\u4f7f\u7528\u6c49\u5b57\u8f6c\u62fc\u97f3\u5e93\u7b49\u3002\u4f7f\u7528 [&hellip;]","protected":false},"author":3,"featured_media":1059596,"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\/1059589"}],"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=1059589"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1059589\/revisions"}],"predecessor-version":[{"id":1059600,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1059589\/revisions\/1059600"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1059596"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1059589"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1059589"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1059589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}