{"id":1098748,"date":"2025-01-08T15:24:04","date_gmt":"2025-01-08T07:24:04","guid":{"rendered":""},"modified":"2025-01-08T15:24:09","modified_gmt":"2025-01-08T07:24:09","slug":"python%e5%a6%82%e4%bd%95%e5%ae%9a%e4%b9%89int%e7%b1%bb%e5%9e%8b%e6%95%b0%e6%8d%ae%e7%b1%bb%e5%9e%8b-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1098748.html","title":{"rendered":"python\u5982\u4f55\u5b9a\u4e49int\u7c7b\u578b\u6570\u636e\u7c7b\u578b"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25062813\/f4dbab09-be89-4a55-a9a8-8e688173dd21.webp\" alt=\"python\u5982\u4f55\u5b9a\u4e49int\u7c7b\u578b\u6570\u636e\u7c7b\u578b\" \/><\/p>\n<p><p> <strong>Python\u5b9a\u4e49int\u7c7b\u578b\u6570\u636e\u7c7b\u578b\u7684\u65b9\u6cd5\u662f\u4f7f\u7528int\u5173\u952e\u5b57\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570int()\u3001\u76f4\u63a5\u8d4b\u503c\u6574\u6570\u7ed9\u53d8\u91cf\u3002<\/strong> \u5176\u4e2d\u6700\u5e38\u89c1\u7684\u65b9\u5f0f\u662f\u76f4\u63a5\u8d4b\u503c\u6574\u6570\u7ed9\u53d8\u91cf\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u63cf\u8ff0\uff1a<\/p>\n<\/p>\n<p><p>\u76f4\u63a5\u8d4b\u503c\u6574\u6570\u7ed9\u53d8\u91cf\u662f\u6700\u5e38\u89c1\u548c\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u3002\u4f60\u53ea\u9700\u5c06\u4e00\u4e2a\u6574\u6570\u503c\u8d4b\u7ed9\u4e00\u4e2a\u53d8\u91cf\u5373\u53ef\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">number = 10<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u53d8\u91cf<code>number<\/code>\u88ab\u5206\u914d\u4e86\u6574\u6570\u503c10\u3002Python\u4f1a\u81ea\u52a8\u5c06\u5176\u8bc6\u522b\u4e3aint\u7c7b\u578b\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8Python\u4e2d\u5b9a\u4e49int\u7c7b\u578b\u6570\u636e\u7684\u5404\u79cd\u65b9\u6cd5\u53ca\u5176\u76f8\u5173\u77e5\u8bc6\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u76f4\u63a5\u8d4b\u503c\u6574\u6570\u7ed9\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>Python\u662f\u4e00\u79cd\u52a8\u6001\u7c7b\u578b\u7684\u8bed\u8a00\uff0c\u8fd9\u610f\u5473\u7740\u4f60\u4e0d\u9700\u8981\u663e\u5f0f\u5730\u58f0\u660e\u53d8\u91cf\u7684\u6570\u636e\u7c7b\u578b\u3002\u5f53\u4f60\u5c06\u4e00\u4e2a\u6574\u6570\u503c\u8d4b\u7ed9\u4e00\u4e2a\u53d8\u91cf\u65f6\uff0cPython\u4f1a\u81ea\u52a8\u5c06\u5176\u8bc6\u522b\u4e3aint\u7c7b\u578b\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">a = 5<\/p>\n<p>b = -3<\/p>\n<p>c = 0<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u53d8\u91cf<code>a<\/code>\u3001<code>b<\/code>\u548c<code>c<\/code>\u5206\u522b\u88ab\u8d4b\u503c5\u3001-3\u548c0\u3002Python\u4f1a\u81ea\u52a8\u5c06\u8fd9\u4e9b\u53d8\u91cf\u8bc6\u522b\u4e3aint\u7c7b\u578b\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570int()<\/h3>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5185\u7f6e\u51fd\u6570<code>int()<\/code>\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u5b83\u5c06\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u4e3aint\u7c7b\u578b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">float_number = 3.14<\/p>\n<p>integer_number = int(float_number)<\/p>\n<p>print(integer_number)  # \u8f93\u51fa: 3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u53d8\u91cf<code>float_number<\/code>\u88ab\u8d4b\u503c3.14\u3002\u6211\u4eec\u4f7f\u7528\u5185\u7f6e\u51fd\u6570<code>int()<\/code>\u5c06\u5176\u8f6c\u6362\u4e3aint\u7c7b\u578b\uff0c\u5e76\u5c06\u7ed3\u679c\u8d4b\u7ed9\u53d8\u91cf<code>integer_number<\/code>\u3002\u8f93\u51fa\u7ed3\u679c\u4e3a3\uff0c\u56e0\u4e3a<code>int()<\/code>\u51fd\u6570\u4f1a\u622a\u65ad\u6d6e\u70b9\u6570\u7684\u5c0f\u6570\u90e8\u5206\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528int()\u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\uff0c\u4f60\u53ef\u80fd\u4f1a\u4ece\u7528\u6237\u8f93\u5165\u6216\u6587\u4ef6\u8bfb\u53d6\u6570\u636e\uff0c\u8fd9\u4e9b\u6570\u636e\u901a\u5e38\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528<code>int()<\/code>\u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">string_number = &quot;123&quot;<\/p>\n<p>integer_number = int(string_number)<\/p>\n<p>print(integer_number)  # \u8f93\u51fa: 123<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u53d8\u91cf<code>string_number<\/code>\u88ab\u8d4b\u503c\u5b57\u7b26\u4e32&quot;123&quot;\u3002\u6211\u4eec\u4f7f\u7528<code>int()<\/code>\u51fd\u6570\u5c06\u5176\u8f6c\u6362\u4e3aint\u7c7b\u578b\uff0c\u5e76\u5c06\u7ed3\u679c\u8d4b\u7ed9\u53d8\u91cf<code>integer_number<\/code>\u3002\u8f93\u51fa\u7ed3\u679c\u4e3a123\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5904\u7406\u8fdb\u5236\u8f6c\u6362<\/h3>\n<\/p>\n<p><p>Python\u4e2d\u7684<code>int()<\/code>\u51fd\u6570\u8fd8\u53ef\u4ee5\u5904\u7406\u4e0d\u540c\u8fdb\u5236\u4e4b\u95f4\u7684\u8f6c\u6362\u3002\u4f60\u53ef\u4ee5\u4f20\u9012\u7b2c\u4e8c\u4e2a\u53c2\u6570\u6765\u6307\u5b9a\u5b57\u7b26\u4e32\u6240\u8868\u793a\u7684\u8fdb\u5236\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">binary_string = &quot;1010&quot;<\/p>\n<p>decimal_number = int(binary_string, 2)<\/p>\n<p>print(decimal_number)  # \u8f93\u51fa: 10<\/p>\n<p>hexadecimal_string = &quot;A&quot;<\/p>\n<p>decimal_number = int(hexadecimal_string, 16)<\/p>\n<p>print(decimal_number)  # \u8f93\u51fa: 10<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u7b2c\u4e00\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>binary_string<\/code>\u88ab\u8d4b\u503c\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32&quot;1010&quot;\u3002\u6211\u4eec\u4f7f\u7528<code>int()<\/code>\u51fd\u6570\u5e76\u4f20\u9012\u7b2c\u4e8c\u4e2a\u53c2\u65702\uff0c\u5c06\u5176\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u6574\u6570\uff0c\u7ed3\u679c\u4e3a10\u3002\u5728\u7b2c\u4e8c\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>hexadecimal_string<\/code>\u88ab\u8d4b\u503c\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32&quot;A&quot;\u3002\u6211\u4eec\u4f7f\u7528<code>int()<\/code>\u51fd\u6570\u5e76\u4f20\u9012\u7b2c\u4e8c\u4e2a\u53c2\u657016\uff0c\u5c06\u5176\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u6574\u6570\uff0c\u7ed3\u679c\u540c\u6837\u4e3a10\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u5904\u7406\u5f02\u5e38\u60c5\u51b5<\/h3>\n<\/p>\n<p><p>\u5728\u4f7f\u7528<code>int()<\/code>\u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\u65f6\uff0c\u6709\u65f6\u4f1a\u9047\u5230\u65e0\u6548\u7684\u8f93\u5165\uff0c\u5bfc\u81f4\u7a0b\u5e8f\u629b\u51fa\u5f02\u5e38\u3002\u4e3a\u4e86\u63d0\u9ad8\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>try...except<\/code>\u5757\u6765\u5904\u7406\u8fd9\u4e9b\u5f02\u5e38\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">invalid_string = &quot;abc&quot;<\/p>\n<p>try:<\/p>\n<p>    integer_number = int(invalid_string)<\/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>\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c<code>invalid_string<\/code>\u88ab\u8d4b\u503c\u65e0\u6548\u7684\u5b57\u7b26\u4e32&quot;abc&quot;\u3002\u6211\u4eec\u4f7f\u7528<code>try...except<\/code>\u5757\u6765\u6355\u83b7<code>ValueError<\/code>\u5f02\u5e38\uff0c\u5e76\u8f93\u51fa\u9519\u8bef\u6d88\u606f\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001Python\u4e2d\u7684\u5927\u6574\u6570<\/h3>\n<\/p>\n<p><p>Python\u4e2d\u7684int\u7c7b\u578b\u6ca1\u6709\u56fa\u5b9a\u7684\u5b57\u8282\u6570\uff0c\u652f\u6301\u4efb\u610f\u5927\u5c0f\u7684\u6574\u6570\u3002\u8fd9\u662f\u56e0\u4e3aPython\u7684int\u7c7b\u578b\u5728\u5185\u90e8\u52a8\u6001\u5206\u914d\u5185\u5b58\u6765\u5b58\u50a8\u5927\u6574\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">large_number = 123456789012345678901234567890<\/p>\n<p>print(large_number)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c<code>large_number<\/code>\u88ab\u8d4b\u503c\u4e00\u4e2a\u975e\u5e38\u5927\u7684\u6574\u6570\u3002Python\u80fd\u591f\u6b63\u786e\u5730\u5904\u7406\u548c\u8f93\u51fa\u8fd9\u4e2a\u5927\u6574\u6570\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001int\u7c7b\u578b\u7684\u5e38\u7528\u64cd\u4f5c<\/h3>\n<\/p>\n<p><h4>1. \u7b97\u672f\u8fd0\u7b97<\/h4>\n<\/p>\n<p><p>Python\u652f\u6301\u5404\u79cd\u7b97\u672f\u8fd0\u7b97\uff0c\u5982\u52a0\u6cd5\u3001\u51cf\u6cd5\u3001\u4e58\u6cd5\u548c\u9664\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">a = 10<\/p>\n<p>b = 3<\/p>\n<p>print(a + b)  # \u8f93\u51fa: 13<\/p>\n<p>print(a - b)  # \u8f93\u51fa: 7<\/p>\n<p>print(a * b)  # \u8f93\u51fa: 30<\/p>\n<p>print(a \/ b)  # \u8f93\u51fa: 3.3333333333333335<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u6574\u6570\u9664\u6cd5\u548c\u53d6\u4f59<\/h4>\n<\/p>\n<p><p>\u6574\u6570\u9664\u6cd5\u4f7f\u7528<code>\/\/<\/code>\u8fd0\u7b97\u7b26\uff0c\u53d6\u4f59\u4f7f\u7528<code>%<\/code>\u8fd0\u7b97\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">a = 10<\/p>\n<p>b = 3<\/p>\n<p>print(a \/\/ b)  # \u8f93\u51fa: 3<\/p>\n<p>print(a % b)   # \u8f93\u51fa: 1<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u5e42\u8fd0\u7b97<\/h4>\n<\/p>\n<p><p>\u5e42\u8fd0\u7b97\u4f7f\u7528<code><\/code>\u8fd0\u7b97\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">a = 2<\/p>\n<p>b = 3<\/p>\n<p>print(a  b)  # \u8f93\u51fa: 8<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001int\u7c7b\u578b\u7684\u5e94\u7528\u573a\u666f<\/h3>\n<\/p>\n<p><h4>1. \u8ba1\u6570\u5668<\/h4>\n<\/p>\n<p><p>\u5728\u7a0b\u5e8f\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528int\u7c7b\u578b\u7684\u53d8\u91cf\u4f5c\u4e3a\u8ba1\u6570\u5668\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">counter = 0<\/p>\n<p>for i in range(10):<\/p>\n<p>    counter += 1<\/p>\n<p>print(counter)  # \u8f93\u51fa: 10<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u7d22\u5f15<\/h4>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5217\u8868\u6216\u5b57\u7b26\u4e32\u65f6\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528int\u7c7b\u578b\u7684\u53d8\u91cf\u4f5c\u4e3a\u7d22\u5f15\u6765\u8bbf\u95ee\u5143\u7d20\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">fruits = [&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;]<\/p>\n<p>index = 1<\/p>\n<p>print(fruits[index])  # \u8f93\u51fa: banana<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>Python\u4e2d\u5b9a\u4e49int\u7c7b\u578b\u6570\u636e\u7c7b\u578b\u7684\u65b9\u6cd5\u975e\u5e38\u7b80\u5355\uff0c\u53ef\u4ee5\u901a\u8fc7\u76f4\u63a5\u8d4b\u503c\u6574\u6570\u7ed9\u53d8\u91cf\uff0c\u4f7f\u7528\u5185\u7f6e\u51fd\u6570<code>int()<\/code>\uff0c\u4ee5\u53ca\u5904\u7406\u4e0d\u540c\u8fdb\u5236\u4e4b\u95f4\u7684\u8f6c\u6362\u3002\u4e86\u89e3\u548c\u638c\u63e1\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5728\u7f16\u7a0b\u4e2d\u66f4\u597d\u5730\u5904\u7406\u6574\u6570\u6570\u636e\u3002\u540c\u65f6\uff0cPython\u4e2d\u7684int\u7c7b\u578b\u652f\u6301\u4efb\u610f\u5927\u5c0f\u7684\u6574\u6570\uff0c\u80fd\u591f\u5904\u7406\u5404\u79cd\u7b97\u672f\u8fd0\u7b97\uff0c\u4f7f\u5f97\u7f16\u7a0b\u66f4\u52a0\u7075\u6d3b\u548c\u65b9\u4fbf\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0cint\u7c7b\u578b\u5e7f\u6cdb\u7528\u4e8e\u8ba1\u6570\u5668\u3001\u7d22\u5f15\u7b49\u573a\u666f\uff0c\u662fPython\u7f16\u7a0b\u4e2d\u975e\u5e38\u91cd\u8981\u7684\u4e00\u90e8\u5206\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\u6570\u53d8\u91cf\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5b9a\u4e49\u4e00\u4e2a\u6574\u6570\u53d8\u91cf\u975e\u5e38\u7b80\u5355\u3002\u53ea\u9700\u4f7f\u7528\u8d4b\u503c\u8bed\u53e5\u5373\u53ef\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>my_number<\/code>\u7684\u6574\u6570\u53d8\u91cf\uff1a  <\/p>\n<pre><code class=\"language-python\">my_number = 10\n<\/code><\/pre>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>10<\/code>\u5c31\u662f\u4e00\u4e2a\u6574\u6570\uff0c\u8d4b\u503c\u540e\uff0c<code>my_number<\/code>\u4fbf\u5b58\u50a8\u4e86\u8fd9\u4e2a\u503c\u3002<\/p>\n<p><strong>Python\u7684\u6574\u6570\u7c7b\u578b\u6709\u54ea\u4e9b\u7279\u6027\uff1f<\/strong><br \/>Python\u4e2d\u7684\u6574\u6570\u7c7b\u578b\u662f\u975e\u5e38\u7075\u6d3b\u7684\u3002\u5b83\u652f\u6301\u4efb\u610f\u5927\u5c0f\u7684\u6574\u6570\uff0c\u610f\u5473\u7740\u60a8\u53ef\u4ee5\u5904\u7406\u975e\u5e38\u5927\u7684\u6570\u5b57\u800c\u4e0d\u5fc5\u62c5\u5fc3\u6ea2\u51fa\u3002\u6b64\u5916\uff0cPython\u8fd8\u5141\u8bb8\u60a8\u4f7f\u7528\u4e0d\u540c\u7684\u8fdb\u5236\u8868\u793a\u6574\u6570\uff0c\u4f8b\u5982\u5341\u8fdb\u5236\u3001\u4e8c\u8fdb\u5236\u548c\u5341\u516d\u8fdb\u5236\uff0c\u5206\u522b\u7528<code>0d<\/code>\u3001<code>0b<\/code>\u548c<code>0x<\/code>\u524d\u7f00\u8868\u793a\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">decimal_number = 42      # \u5341\u8fdb\u5236\nbinary_number = 0b101010 # \u4e8c\u8fdb\u5236\nhexadecimal_number = 0x2A # \u5341\u516d\u8fdb\u5236\n<\/code><\/pre>\n<p><strong>\u5982\u4f55\u68c0\u67e5\u4e00\u4e2a\u53d8\u91cf\u662f\u5426\u662f\u6574\u6570\u7c7b\u578b\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>isinstance()<\/code>\u51fd\u6570\u6765\u68c0\u67e5\u4e00\u4e2a\u53d8\u91cf\u662f\u5426\u4e3a\u6574\u6570\u7c7b\u578b\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a  <\/p>\n<pre><code class=\"language-python\">my_var = 20\nif isinstance(my_var, int):\n    print(&quot;my_var\u662f\u4e00\u4e2a\u6574\u6570&quot;)\nelse:\n    print(&quot;my_var\u4e0d\u662f\u4e00\u4e2a\u6574\u6570&quot;)\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u80fd\u591f\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\uff0c\u8fd8\u80fd\u5e2e\u52a9\u60a8\u5728\u8c03\u8bd5\u65f6\u5feb\u901f\u8bc6\u522b\u6570\u636e\u7c7b\u578b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5b9a\u4e49int\u7c7b\u578b\u6570\u636e\u7c7b\u578b\u7684\u65b9\u6cd5\u662f\u4f7f\u7528int\u5173\u952e\u5b57\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570int()\u3001\u76f4\u63a5\u8d4b\u503c\u6574\u6570\u7ed9\u53d8\u91cf\u3002 \u5176\u4e2d [&hellip;]","protected":false},"author":3,"featured_media":1098764,"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\/1098748"}],"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=1098748"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1098748\/revisions"}],"predecessor-version":[{"id":1098769,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1098748\/revisions\/1098769"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1098764"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1098748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1098748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1098748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}