{"id":143756,"date":"2019-05-07T08:35:13","date_gmt":"2019-05-07T00:35:13","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=143756"},"modified":"2019-04-26T15:37:17","modified_gmt":"2019-04-26T07:37:17","slug":"python-int-variable","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/python-int-variable.html","title":{"rendered":"python\u6574\u6570\u548c\u53d8\u91cf"},"content":{"rendered":"
1.\u6574\u6570<\/strong><\/div>\n
Python\u53ef\u4ee5\u5904\u7406\u4efb\u610f\u5927\u5c0f\u7684\u6574\u6570\uff0c\u5f53\u7136\u5305\u62ec\u8d1f\u6574\u6570\uff0c\u5728\u7a0b\u5e8f\u4e2d\u7684\u8868\u793a\u65b9\u6cd5\u548c\u6570\u5b66\u4e0a\u7684\u5199\u6cd5\u4e00\u6a21\u4e00\u6837\u3002<\/div>\n
2.\u6d6e\u70b9\u6570<\/strong><\/div>\n
\u6d6e\u70b9\u6570\u4e5f\u5c31\u662f\u5c0f\u6570\uff0c\u4e4b\u6240\u4ee5\u79f0\u4e3a\u6d6e\u70b9\u6570\uff0c\u662f\u56e0\u4e3a\u6309\u7167\u79d1\u5b66\u8bb0\u6570\u6cd5\u8868\u793a\u65f6\uff0c\u4e00\u4e2a\u6d6e\u70b9\u6570\u7684\u5c0f\u6570\u70b9\u4f4d\u7f6e\u662f\u53ef\u53d8\u7684\uff0c\u6bd4\u5982\uff0c1.23x109\u548c12.3x108\u662f\u5b8c\u5168\u76f8\u7b49\u7684\u3002<\/div>\n
\u6ce8\uff1a\u6574\u6570\u548c\u6d6e\u70b9\u6570\u5728\u8ba1\u7b97\u673a\u5185\u90e8\u5b58\u50a8\u7684\u65b9\u5f0f\u662f\u4e0d\u540c\u7684\uff0c\u6574\u6570\u8fd0\u7b97\u6c38\u8fdc\u662f\u7cbe\u786e\u7684\uff08\u9664\u6cd5\u96be\u9053\u4e5f\u662f\u7cbe\u786e\u7684\uff1f\u662f\u7684\uff01\uff09\uff0c\u800c\u6d6e\u70b9\u6570\u8fd0\u7b97\u5219\u53ef\u80fd\u4f1a\u6709\u56db\u820d\u4e94\u5165\u7684\u8bef\u5dee\u3002<\/div>\n
3.\u5b57\u7b26\u4e32<\/strong><\/div>\n
    \n
  1. \u5b57\u7b26\u4e32\u662f\u4ee5\u5355\u5f15\u53f7'\u6216\u53cc\u5f15\u53f7\"\u62ec\u8d77\u6765\u7684\u4efb\u610f\u6587\u672c\u3002<\/li>\n
  2. \u8f6c\u4e49\u5b57\u7b26\\\u53ef\u4ee5\u8f6c\u4e49\u5f88\u591a\u5b57\u7b26\uff0c\u6bd4\u5982\\n\u8868\u793a\u6362\u884c\uff0c\\t\u8868\u793a\u5236\u8868\u7b26\uff0c\u5b57\u7b26\\\u672c\u8eab\u4e5f\u8981\u8f6c\u4e49\uff0c\u6240\u4ee5\\\\\u8868\u793a\u7684\u5b57\u7b26\u5c31\u662f\\\u3002<\/li>\n
  3. \u5982\u679c\u5b57\u7b26\u4e32\u91cc\u9762\u6709\u5f88\u591a\u5b57\u7b26\u90fd\u9700\u8981\u8f6c\u4e49\uff0c\u5c31\u9700\u8981\u52a0\u5f88\u591a\\\uff0c\u4e3a\u4e86\u7b80\u5316\uff0cPython\u8fd8\u5141\u8bb8\u7528r''\u8868\u793a''\u5185\u90e8\u7684\u5b57\u7b26\u4e32\u9ed8\u8ba4\u4e0d\u8f6c\u4e49\u3002<\/li>\n
  4. \u5982\u679c\u5b57\u7b26\u4e32\u5185\u90e8\u6709\u5f88\u591a\u6362\u884c\uff0c\u7528\\n\u5199\u5728\u4e00\u884c\u91cc\u4e0d\u597d\u9605\u8bfb\uff0c\u4e3a\u4e86\u7b80\u5316\uff0cPython\u5141\u8bb8\u7528'''...'''\u7684\u683c\u5f0f\u8868\u793a\u591a\u884c\u5185\u5bb9\u3002<\/li>\n
  5. \u591a\u884c\u5b57\u7b26\u4e32'''...'''\u8fd8\u53ef\u4ee5\u5728\u524d\u9762\u52a0\u4e0ar\u4f7f\u7528\u3002<\/li>\n<\/ol>\n
    4.\u5e03\u5c14\u503c<\/strong><\/div>\n
      \n
    1. \u5e03\u5c14\u503c\u548c\u5e03\u5c14\u4ee3\u6570\u7684\u8868\u793a\u5b8c\u5168\u4e00\u81f4\uff0c\u4e00\u4e2a\u5e03\u5c14\u503c\u53ea\u6709True\u3001False\u4e24\u79cd\u503c\u3002<\/li>\n
    2. \u5e03\u5c14\u503c\u53ef\u4ee5\u7528and\u3001or\u548cnot\u8fd0\u7b97\u3002and\u8fd0\u7b97\u662f\u4e0e\u8fd0\u7b97\uff0c\u53ea\u6709\u6240\u6709\u90fd\u4e3aTrue\uff0cand\u8fd0\u7b97\u7ed3\u679c\u624d\u662fTrue<\/li>\n
    3. or\u8fd0\u7b97\u662f\u6216\u8fd0\u7b97\uff0c\u53ea\u8981\u5176\u4e2d\u6709\u4e00\u4e2a\u4e3aTrue\uff0cor\u8fd0\u7b97\u7ed3\u679c\u5c31\u662fTrue<\/li>\n
    4. not\u8fd0\u7b97\u662f\u975e\u8fd0\u7b97\uff0c\u5b83\u662f\u4e00\u4e2a\u5355\u76ee\u8fd0\u7b97\u7b26\uff0c\u628aTrue\u53d8\u6210False\uff0cFalse\u53d8\u6210True\uff1a<\/li>\n<\/ol>\n
      5.\u7a7a\u503c<\/strong><\/div>\n
      \u7a7a\u503c\u662fPython\u91cc\u4e00\u4e2a\u7279\u6b8a\u7684\u503c\uff0c\u7528None\u8868\u793a\u3002None\u4e0d\u80fd\u7406\u89e3\u4e3a0\uff0c\u56e0\u4e3a0\u662f\u6709\u610f\u4e49\u7684\uff0c\u800cNone\u662f\u4e00\u4e2a\u7279\u6b8a\u7684\u7a7a\u503c\u3002<\/div>\n
      6.\u53d8\u91cf<\/strong><\/div>\n
        \n
      1. \u53d8\u91cf\u4e0d\u4ec5\u53ef\u4ee5\u662f\u6570\u5b57\uff0c\u8fd8\u53ef\u4ee5\u662f\u4efb\u610f\u6570\u636e\u7c7b\u578b\u3002<\/li>\n
      2. \u53d8\u91cf\u5728\u7a0b\u5e8f\u4e2d\u5c31\u662f\u7528\u4e00\u4e2a\u53d8\u91cf\u540d\u8868\u793a\u4e86\uff0c\u53d8\u91cf\u540d\u5fc5\u987b\u662f\u5927\u5c0f\u5199\u82f1\u6587\u3001\u6570\u5b57\u548c_\u7684\u7ec4\u5408\uff0c\u4e14\u4e0d\u80fd\u7528\u6570\u5b57\u5f00\u5934<\/li>\n
      3. \u53d8\u91cf\u672c\u8eab\u7c7b\u578b\u4e0d\u56fa\u5b9a\u7684\u8bed\u8a00\u79f0\u4e4b\u4e3a\u52a8\u6001\u8bed\u8a00\uff0c\u4e0e\u4e4b\u5bf9\u5e94\u7684\u662f\u9759\u6001\u8bed\u8a00\u3002\u9759\u6001\u8bed\u8a00\u5728\u5b9a\u4e49\u53d8\u91cf\u65f6\u5fc5\u987b\u6307\u5b9a\u53d8\u91cf\u7c7b\u578b\uff0c\u5982\u679c\u8d4b\u503c\u7684\u65f6\u5019\u7c7b\u578b\u4e0d\u5339\u914d\uff0c\u5c31\u4f1a\u62a5\u9519\u3002<\/li>\n<\/ol>\n
        7.\u5e38\u91cf<\/strong><\/div>\n
        \u6240\u8c13\u5e38\u91cf\u5c31\u662f\u4e0d\u80fd\u53d8\u7684\u53d8\u91cf\uff0c\u6bd4\u5982\u5e38\u7528\u7684\u6570\u5b66\u5e38\u6570\u03c0\u5c31\u662f\u4e00\u4e2a\u5e38\u91cf\u3002\u5728Python\u4e2d\uff0c\u901a\u5e38\u7528\u5168\u90e8\u5927\u5199\u7684\u53d8\u91cf\u540d\u8868\u793a\u5e38\u91cf<\/div>\n
        8\u5c0f\u7ed3\uff1a<\/strong><\/div>\n
        \u5bf9\u53d8\u91cf\u8d4b\u503cx = y\u662f\u628a\u53d8\u91cfx\u6307\u5411\u771f\u6b63\u7684\u5bf9\u8c61\uff0c\u8be5\u5bf9\u8c61\u662f\u53d8\u91cfy\u6240\u6307\u5411\u7684\u3002\u968f\u540e\u5bf9\u53d8\u91cfy\u7684\u8d4b\u503c\u4e0d\u5f71\u54cd\u53d8\u91cfx\u7684\u6307\u5411<\/div>\n","protected":false},"excerpt":{"rendered":"

        Python\u53ef\u4ee5\u5904\u7406\u4efb\u610f\u5927\u5c0f\u7684\u6574\u6570\uff0c\u5f53\u7136\u5305\u62ec\u8d1f\u6574\u6570\uff0c\u5728\u7a0b\u5e8f\u4e2d\u7684\u8868\u793a\u65b9\u6cd5\u548c\u6570\u5b66\u4e0a\u7684\u5199\u6cd5\u4e00\u6a21\u4e00\u6837\u3002 \u6d6e\u70b9\u6570\u4e5f\u5c31\u662f\u5c0f […]<\/p>\n","protected":false},"author":1476,"featured_media":113018,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-143756","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/143756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1476"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=143756"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/143756\/revisions"}],"predecessor-version":[{"id":143794,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/143756\/revisions\/143794"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/113018"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=143756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=143756"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=143756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}