{"id":1063065,"date":"2024-12-31T15:57:28","date_gmt":"2024-12-31T07:57:28","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1063065.html"},"modified":"2024-12-31T15:57:32","modified_gmt":"2024-12-31T07:57:32","slug":"python%e5%a6%82%e4%bd%95%e6%8a%8a%e5%ad%97%e7%ac%a6%e4%b8%b2%e5%8f%98%e4%b8%ba%e6%95%b0%e5%ad%97","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1063065.html","title":{"rendered":"python\u5982\u4f55\u628a\u5b57\u7b26\u4e32\u53d8\u4e3a\u6570\u5b57"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/a661f71b-26d3-45bc-8f21-49e2735df12d.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u628a\u5b57\u7b26\u4e32\u53d8\u4e3a\u6570\u5b57\" \/><\/p>\n<p><p> <strong>Python\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u5b57\uff0c\u5982\uff1aint()\u3001float()\u7b49\u3002<\/strong> \u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u89e3\u91ca\u53ca\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><p>Python \u63d0\u4f9b\u4e86\u51e0\u79cd\u65b9\u6cd5\u6765\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u5b57\uff0c\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u5185\u7f6e\u51fd\u6570 int() \u548c float()\u3002int() \u7528\u4e8e\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\uff0c\u800c float() \u7528\u4e8e\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\u3002\u9664\u4e86\u8fd9\u4e9b\uff0cPython \u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5176\u4ed6\u65b9\u6cd5\uff0c\u6bd4\u5982\u901a\u8fc7\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u6570\u5b57\u6216\u4f7f\u7528 eval() \u51fd\u6570\u6765\u5904\u7406\u66f4\u590d\u6742\u7684\u5b57\u7b26\u4e32\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u8ba8\u8bba\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u63d0\u4f9b\u793a\u4f8b\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528 int() \u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570<\/p>\n<\/p>\n<p><p>int() \u51fd\u6570\u662f\u6700\u5e38\u7528\u7684\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\u7684\u65b9\u6cd5\u3002\u5b83\u53ef\u4ee5\u5c06\u5305\u542b\u6570\u5b57\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\uff0c\u4f46\u5982\u679c\u5b57\u7b26\u4e32\u5305\u542b\u975e\u6570\u5b57\u5b57\u7b26\uff0c\u5219\u4f1a\u5f15\u53d1 ValueError \u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b<\/p>\n<p>str_num = &quot;123&quot;<\/p>\n<p>num = int(str_num)<\/p>\n<p>print(num)  # \u8f93\u51fa\uff1a123<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5c06\u5b57\u7b26\u4e32 &quot;123&quot; \u8f6c\u6362\u4e3a\u4e86\u6574\u6570 123\u3002\u5982\u679c\u5b57\u7b26\u4e32\u5305\u542b\u975e\u6570\u5b57\u5b57\u7b26\uff0c\u4f1a\u5f15\u53d1\u5f02\u5e38\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b<\/p>\n<p>str_num = &quot;123abc&quot;<\/p>\n<p>try:<\/p>\n<p>    num = int(str_num)<\/p>\n<p>except ValueError:<\/p>\n<p>    print(&quot;\u65e0\u6cd5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528 float() \u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570<\/p>\n<\/p>\n<p><p>\u5982\u679c\u5b57\u7b26\u4e32\u8868\u793a\u7684\u662f\u6d6e\u70b9\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528 float() \u51fd\u6570\u8fdb\u884c\u8f6c\u6362\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b<\/p>\n<p>str_num = &quot;123.45&quot;<\/p>\n<p>num = float(str_num)<\/p>\n<p>print(num)  # \u8f93\u51fa\uff1a123.45<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u540c\u6837\uff0c\u5982\u679c\u5b57\u7b26\u4e32\u5305\u542b\u975e\u6570\u5b57\u5b57\u7b26\u6216\u683c\u5f0f\u4e0d\u6b63\u786e\uff0c\u4f1a\u5f15\u53d1 ValueError \u5f02\u5e38\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b<\/p>\n<p>str_num = &quot;123.45abc&quot;<\/p>\n<p>try:<\/p>\n<p>    num = float(str_num)<\/p>\n<p>except ValueError:<\/p>\n<p>    print(&quot;\u65e0\u6cd5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528 eval() \u51fd\u6570\u5904\u7406\u66f4\u590d\u6742\u7684\u5b57\u7b26\u4e32<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u5b57\u7b26\u4e32\u53ef\u80fd\u5305\u542b\u6570\u5b66\u8868\u8fbe\u5f0f\u6216\u66f4\u590d\u6742\u7684\u5185\u5bb9\uff0c\u6b64\u65f6\u53ef\u4ee5\u4f7f\u7528 eval() \u51fd\u6570\u3002eval() \u51fd\u6570\u4f1a\u89e3\u6790\u5e76\u6267\u884c\u5b57\u7b26\u4e32\u4e2d\u7684\u8868\u8fbe\u5f0f\uff0c\u4f46\u9700\u8981\u6ce8\u610f\u5b89\u5168\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4f1a\u6267\u884c\u5b57\u7b26\u4e32\u4e2d\u7684\u4efb\u4f55\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b<\/p>\n<p>str_expr = &quot;123 + 456&quot;<\/p>\n<p>num = eval(str_expr)<\/p>\n<p>print(num)  # \u8f93\u51fa\uff1a579<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528 eval() \u65f6\u9700\u8981\u7279\u522b\u5c0f\u5fc3\uff0c\u4e0d\u8981\u5bf9\u4e0d\u53d7\u4fe1\u4efb\u7684\u8f93\u5165\u4f7f\u7528\u5b83\uff0c\u4ee5\u514d\u5f15\u53d1\u5b89\u5168\u95ee\u9898\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u6570\u5b57<\/p>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0c\u5b57\u7b26\u4e32\u4e2d\u5305\u542b\u975e\u6570\u5b57\u5b57\u7b26\uff0c\u4f46\u6211\u4eec\u53ea\u5e0c\u671b\u63d0\u53d6\u5176\u4e2d\u7684\u6570\u5b57\uff0c\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5b8c\u6210\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>str_with_num = &quot;abc123def&quot;<\/p>\n<p>match = re.search(r&#39;\\d+&#39;, str_with_num)<\/p>\n<p>if match:<\/p>\n<p>    num = int(match.group())<\/p>\n<p>    print(num)  # \u8f93\u51fa\uff1a123<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f <code>\\d+<\/code> \u5339\u914d\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u5b57\u90e8\u5206\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u6574\u6570\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u5904\u7406\u5305\u542b\u5343\u5206\u4f4d\u5206\u9694\u7b26\u7684\u5b57\u7b26\u4e32<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u5b57\u53ef\u80fd\u5305\u542b\u5343\u5206\u4f4d\u5206\u9694\u7b26\uff08\u5982\u9017\u53f7\uff09\uff0c\u6211\u4eec\u9700\u8981\u5148\u79fb\u9664\u8fd9\u4e9b\u5206\u9694\u7b26\uff0c\u7136\u540e\u518d\u8fdb\u884c\u8f6c\u6362\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b<\/p>\n<p>str_num = &quot;1,234,567&quot;<\/p>\n<p>str_num = str_num.replace(&#39;,&#39;, &#39;&#39;)<\/p>\n<p>num = int(str_num)<\/p>\n<p>print(num)  # \u8f93\u51fa\uff1a1234567<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4f7f\u7528 replace() \u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u79fb\u9664\u5b57\u7b26\u4e32\u4e2d\u7684\u5343\u5206\u4f4d\u5206\u9694\u7b26\uff0c\u7136\u540e\u518d\u4f7f\u7528 int() \u51fd\u6570\u8fdb\u884c\u8f6c\u6362\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u590d\u6570<\/p>\n<\/p>\n<p><p>\u5982\u679c\u5b57\u7b26\u4e32\u8868\u793a\u7684\u662f\u590d\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528 complex() \u51fd\u6570\u8fdb\u884c\u8f6c\u6362\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b<\/p>\n<p>str_num = &quot;1+2j&quot;<\/p>\n<p>num = complex(str_num)<\/p>\n<p>print(num)  # \u8f93\u51fa\uff1a(1+2j)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>complex() \u51fd\u6570\u53ef\u4ee5\u5c06\u8868\u793a\u590d\u6570\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u590d\u6570\u7c7b\u578b\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u901a\u8fc7\u81ea\u5b9a\u4e49\u51fd\u6570\u5904\u7406\u7279\u6b8a\u60c5\u51b5<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u7279\u6b8a\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u81ea\u5b9a\u4e49\u51fd\u6570\u6765\u5904\u7406\u5b57\u7b26\u4e32\u8f6c\u6362\u3002\u4f8b\u5982\uff0c\u5904\u7406\u5e26\u6709\u8d27\u5e01\u7b26\u53f7\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u81ea\u5b9a\u4e49\u51fd\u6570\u793a\u4f8b<\/p>\n<p>def convert_currency_to_number(currency_str):<\/p>\n<p>    # \u79fb\u9664\u8d27\u5e01\u7b26\u53f7\u548c\u5343\u5206\u4f4d\u5206\u9694\u7b26<\/p>\n<p>    currency_str = currency_str.replace(&#39;$&#39;, &#39;&#39;).replace(&#39;,&#39;, &#39;&#39;)<\/p>\n<p>    return float(currency_str)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>currency_str = &quot;$1,234.56&quot;<\/p>\n<p>num = convert_currency_to_number(currency_str)<\/p>\n<p>print(num)  # \u8f93\u51fa\uff1a1234.56<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u81ea\u5b9a\u4e49\u51fd\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u66f4\u7075\u6d3b\u5730\u5904\u7406\u5404\u79cd\u7279\u6b8a\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><p>\u516b\u3001\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5e03\u5c14\u503c<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5e03\u5c14\u503c\u3002\u867d\u7136\u5e03\u5c14\u503c\u4e0d\u662f\u6570\u5b57\uff0c\u4f46\u5728\u903b\u8f91\u5904\u7406\u4e2d\u975e\u5e38\u91cd\u8981\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u793a\u4f8b<\/p>\n<p>str_bool = &quot;True&quot;<\/p>\n<p>bool_val = str_bool.lower() == &#39;true&#39;<\/p>\n<p>print(bool_val)  # \u8f93\u51fa\uff1aTrue<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5c06\u5b57\u7b26\u4e32 &quot;True&quot; \u8f6c\u6362\u4e3a\u4e86\u5e03\u5c14\u503c True\u3002<\/p>\n<\/p>\n<p><p>\u603b\u7ed3\uff1a<\/p>\n<\/p>\n<p><p>Python \u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u5b57\uff0c\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528 int() \u548c float() \u51fd\u6570\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 eval() \u51fd\u6570\u5904\u7406\u66f4\u590d\u6742\u7684\u5b57\u7b26\u4e32\uff0c\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u6570\u5b57\uff0c\u5904\u7406\u5305\u542b\u5343\u5206\u4f4d\u5206\u9694\u7b26\u7684\u5b57\u7b26\u4e32\uff0c\u4ee5\u53ca\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u590d\u6570\u548c\u5e03\u5c14\u503c\u3002\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6240\u9700\u7684\u6570\u5b57\u7c7b\u578b\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\u6216\u6d6e\u70b9\u6570\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>int()<\/code>\u548c<code>float()<\/code>\u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\u6216\u6d6e\u70b9\u6570\u3002\u4f8b\u5982\uff0c\u82e5\u6709\u4e00\u4e2a\u5b57\u7b26\u4e32<code>&quot;123&quot;<\/code>\uff0c\u53ef\u4ee5\u901a\u8fc7<code>int(&quot;123&quot;)<\/code>\u5c06\u5176\u8f6c\u6362\u4e3a\u6574\u6570123\u3002\u800c\u5bf9\u4e8e\u5305\u542b\u5c0f\u6570\u7684\u5b57\u7b26\u4e32\uff0c\u5982<code>&quot;123.45&quot;<\/code>\uff0c\u53ef\u4ee5\u4f7f\u7528<code>float(&quot;123.45&quot;)<\/code>\u5c06\u5176\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570123.45\u3002\u786e\u4fdd\u5b57\u7b26\u4e32\u7684\u683c\u5f0f\u6b63\u786e\uff0c\u5426\u5219\u4f1a\u5f15\u53d1<code>ValueError<\/code>\u3002<\/p>\n<p><strong>\u8f6c\u6362\u65f6\u9047\u5230\u9519\u8bef\u8be5\u5982\u4f55\u5904\u7406\uff1f<\/strong><br \/>\u5728\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u5b57\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u683c\u5f0f\u4e0d\u6b63\u786e\u7684\u5b57\u7b26\u4e32\uff0c\u4f8b\u5982<code>&quot;abc&quot;<\/code>\u6216<code>&quot;123abc&quot;<\/code>\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u4f7f\u7528<code>try-except<\/code>\u8bed\u53e5\u6765\u6355\u6349\u5f02\u5e38\uff0c\u4ece\u800c\u5b89\u5168\u5730\u5904\u7406\u9519\u8bef\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">try:\n    number = int(&quot;abc&quot;)\nexcept ValueError:\n    print(&quot;\u8f6c\u6362\u5931\u8d25\uff0c\u8bf7\u786e\u4fdd\u5b57\u7b26\u4e32\u662f\u6709\u6548\u7684\u6570\u5b57\u683c\u5f0f\u3002&quot;)\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u80fd\u5e2e\u52a9\u7a0b\u5e8f\u5728\u8fd0\u884c\u65f6\u4fdd\u6301\u7a33\u5b9a\uff0c\u5e76\u63d0\u4f9b\u53cb\u597d\u7684\u9519\u8bef\u63d0\u793a\u3002<\/p>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u5c06\u5305\u542b\u7a7a\u683c\u6216\u5176\u4ed6\u5b57\u7b26\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u5b57\uff1f<\/strong><br \/>\u5982\u679c\u5b57\u7b26\u4e32\u4e2d\u5305\u542b\u7a7a\u683c\uff0c\u4f7f\u7528<code>strip()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u53bb\u9664\u591a\u4f59\u7684\u7a7a\u767d\u5b57\u7b26\u3002\u5bf9\u4e8e\u5176\u4ed6\u975e\u6570\u5b57\u5b57\u7b26\uff0c\u8f6c\u6362\u5c06\u5931\u8d25\u3002\u53ef\u4ee5\u5148\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6216\u5b57\u7b26\u4e32\u65b9\u6cd5\u6765\u6e05\u6d17\u6570\u636e\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u5b57\u7b26\u4e32<code>&quot;  123  &quot;<\/code>\uff0c\u53ef\u4ee5\u901a\u8fc7<code>int(&quot;  123  &quot;.strip())<\/code>\u6210\u529f\u5c06\u5176\u8f6c\u6362\u4e3a\u6574\u6570123\u3002\u5982\u679c\u5b57\u7b26\u4e32\u4e2d\u542b\u6709\u5b57\u6bcd\u6216\u7b26\u53f7\uff0c\u9700\u5148\u8fdb\u884c\u9002\u5f53\u7684\u6e05\u7406\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6570\u5b57\uff0c\u5982\uff1aint()\u3001float()\u7b49\u3002 \u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u89e3\u91ca\u53ca\u793a\u4f8b [&hellip;]","protected":false},"author":3,"featured_media":1063078,"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\/1063065"}],"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=1063065"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1063065\/revisions"}],"predecessor-version":[{"id":1063079,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1063065\/revisions\/1063079"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1063078"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1063065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1063065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1063065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}