{"id":269,"date":"2018-12-22T15:16:32","date_gmt":"2018-12-22T06:16:32","guid":{"rendered":"https:\/\/www.nblog09.com\/w\/?p=269"},"modified":"2021-11-07T10:14:27","modified_gmt":"2021-11-07T01:14:27","slug":"python-literal","status":"publish","type":"post","link":"https:\/\/www.nblog09.com\/w\/2018\/12\/22\/python-literal\/","title":{"rendered":"Python\u306e\u8ad6\u7406\u578b(Bool)\u3001\u6570\u5024\u578b(Int)\u3001\u6587\u5b57\u5217\u578b(Str)\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081"},"content":{"rendered":"<p>python\u3067\u5229\u7528\u3059\u308b\u91cd\u8981\u306a\u578b\u3068\u3057\u3066\u8ad6\u7406\u578b\u3001\u6570\u5024\u578b\u3001\u6587\u5b57\u5217\u578b\u304c\u3042\u308b\u304c\u3001\u4ee5\u4e0b\u306b\u305d\u308c\u305e\u308c\u306e\u8aac\u660e\u3092\u3059\u308b\u3002<\/p>\n<h2 class=\"title-border\"><strong>\u8ad6\u7406\u578b\u306e\u4f7f\u3044\u65b9<\/strong><\/h2>\n<p>python\u306e\u8ad6\u7406\u578b\u306fbool\u3068\u3044\u3046\u578b\u3067\u3001<span class=\"pink_span\">\u300cTrue\u300d\u3068\u300cFalse\u300d\u306e2\u3064\u306e\u5024\u3060\u3051<\/span>\u304c\u3042\u308b\u3002<br \/>\n\u3053\u308c\u306f\u3001\u4e3b\u306b\u6761\u4ef6\u6587\u306b\u5229\u7528\u3059\u308b\u3002<br \/>\n\uff08\u6761\u4ef6\u6587\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/www.nblog09.com\/w\/2020\/11\/11\/if\/\">\u3053\u3061\u3089<\/a>\u306b\u8a73\u7d30\u3092\u8a18\u8ff0\uff09<\/p>\n<p>if\u6587\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3001if (\u6761\u4ef6) : (\u30d7\u30ed\u30b0\u30e9\u30e0)\u3068\u8a18\u8ff0\u3057\u3001\u6761\u4ef6\u304cTrue\u306e\u5834\u5408\u306b\u5b9f\u884c\u3055\u308c\u3001False\u306e\u5834\u5408\u5b9f\u884c\u3055\u308c\u306a\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\u3002<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\nbool_true = True <strong># bool_true\u306bTrue\u3092\u4ee3\u5165<\/strong><br \/>\nif bool_true:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;print(\"true\") <strong># \u6761\u4ef6\u6587(if\u5185)\u306f\u5b9f\u884c\u3055\u308c\u308b<\/strong><\/p>\n<p>bool_false = False <strong># bool_false\u306bFalse\u3092\u4ee3\u5165 <\/strong><br \/>\nif bool_false:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;print(\"False\") <strong># \u6761\u4ef6\u6587(if\u5185)\u306f\u5b9f\u884c\u3055\u308c\u306a\u3044<\/strong><\/p>\n<p>bool_true = 2 &gt; 1 <strong># 2 &gt; 1\u306f\u6b63\u3057\u3044\u305f\u3081\u3001bool_true\u306bTrue\u304c\u4ee3\u5165\u3055\u308c\u308b<\/strong><br \/>\nif bool_true:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;print(\"true\") <strong># \u6761\u4ef6\u6587\u304c\u5b9f\u884c\u3055\u308c\u3001\u300ctrue\u300d\u3068\u8868\u793a\u3055\u308c\u308b <\/strong><\/p>\n<p>bool_false = 1 &gt; 2 <strong># 1 &gt; 2\u306f\u8aa4\u3063\u3066\u3044\u308b\u305f\u3081\u3001bool_false\u306bFalse\u304c\u4ee3\u5165\u3055\u308c\u308b<\/strong><br \/>\nif bool_false:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;print(\"False\") <strong># \u6761\u4ef6\u6587\u304c\u5b9f\u884c\u3055\u308c\u305a\u3001\u300cFalse\u300d\u306f\u8868\u793a\u3055\u308c\u306a\u3044<\/strong><\/p>\n<p><span class=\"red_span\">#&nbsp;and\u3000and\u306f(\u5f0f1 and \u5f0f2)\u3068\u8a18\u8ff0\u3057\u3001\u5f0f1\u3068\u5f0f2\u306e\u4e21\u65b9\u304c\u6b63\u3057\u3044\u3068\u304d\u306bTrue,\u305d\u308c\u4f8b\u5916\u306fFalse\u3092\u8fd4\u3059<\/span><\/p>\n<p>bool_true = (2 &gt; 1) and (3 &gt; 1) <strong># 2 &gt; 1\u30683 &gt; 1\u306f\u4e21\u65b9\u6b63\u3057\u3044\u305f\u3081\u3001bool_true\u306b\u306fTrue\u304c\u4ee3\u5165\u3055\u308c\u308b<\/strong><br \/>\nif bool_true:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;print(\"True\")<strong> # \u6761\u4ef6\u6587\u304c\u5b9f\u884c\u3055\u308c\u3001\u300cTrue\u300d\u3068\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p>bool_false = (2 &gt; 1) and (1 &gt; 1) <strong># 2 &gt; 1\u306f\u6b63\u3057\u3044\u304c\u30011 &gt; 1\u306f\u8aa4\u3063\u3066\u3044\u308b\u305f\u3081\u3001bool_false\u306bFalse\u304c\u4ee3\u5165\u3055\u308c\u308b<\/strong><br \/>\nif bool_false:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;print(\"False\") <strong># \u6761\u4ef6\u6587\u304c\u5b9f\u884c\u3055\u308c\u305a\u3001\u300cFalse\u300d\u306f\u8868\u793a\u3055\u308c\u306a\u3044<\/strong><\/p>\n<p><span class=\"red_span\"># or\u3000or\u306f(\u5f0f1 and \u5f0f2)\u3068\u8a18\u8ff0\u3057\u3001\u5f0f1\u3068\u5f0f2\u306e\u3069\u3061\u3089\u304b\u4e00\u3064\u3067\u3082\u6b63\u3057\u3044\u3068\u304d\u306b\u306fTrue,\u305d\u308c\u4f8b\u5916\u306fFalse\u304c\u8fd4\u3055\u308c\u308b<\/span><\/p>\n<p>bool_true = (1 &gt; 1) or (3 &gt; 1) <strong># 1 &gt; 1\u306f\u8aa4\u3063\u3066\u3044\u308b\u304c\u30013 &gt; 1\u306f\u4e21\u65b9\u6b63\u3057\u3044\u305f\u3081\u3001bool_true\u306b\u306fTrue\u304c\u4ee3\u5165\u3055\u308c\u308b<\/strong><br \/>\nif bool_true:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;print(\"True\") <strong># \u6761\u4ef6\u6587\u304c\u5b9f\u884c\u3055\u308c\u3001\u300cTrue\u300d\u3068\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p>bool_false = (0 &gt; 1) or (1 &gt; 1) <strong># 0 &gt; 1\u30821 &gt; 1\u306f\u8aa4\u3063\u3066\u3044\u308b\u305f\u3081\u3001bool_false\u306bFalse\u304c\u4ee3\u5165\u3055\u308c\u308b<\/strong><br \/>\nif bool_false:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;print(\"False\") <strong># \u6761\u4ef6\u6587\u304c\u5b9f\u884c\u3055\u308c\u305a\u3001\u300cFalse\u300d\u306f\u8868\u793a\u3055\u308c\u306a\u3044<\/strong><\/p>\n<p><span class=\"red_span\">#&nbsp;not not\u306fnot (\u5f0f1)\u3068\u8a18\u8ff0\u3057\u3001\u5f0f1\u304c\u6b63\u3057\u3044\u3068\u304d\u306b\u306fFalse,\u5f0f1\u304c\u8aa4\u3063\u3066\u3044\u308b\u3068\u304d\u306b\u306fTrue\u3092\u8fd4\u3059<\/span><\/p>\n<p>boolTrue = not (0 &gt; 1) <strong># 0 &gt; 1\u306fFalse\u3060\u304c\u3001not \u304c\u524d\u306b\u3064\u3044\u3066\u3044\u308b\u305f\u3081boolTrue\u306b\u306fTrue\u304c\u683c\u7d0d\u3055\u308c\u308b<\/strong><br \/>\nboolFalse = not (3 &gt; 1) <strong># 3 &gt; 1\u306fTrue\u3060\u304c\u3001not \u304c\u524d\u306b\u3064\u3044\u3066\u3044\u308b\u305f\u3081boolFalse\u306b\u306fFalse\u304c\u683c\u7d0d\u3055\u308c\u308b<\/strong>\n<\/div>\n<\/div>\n<h2 class=\"title-border\"><strong>\u6570\u5024\u578b\u306e\u4f7f\u3044\u65b9<\/strong><\/h2>\n<p>python\u306e\u6570\u5024\u578b\u306b\u306f\u3001<span class=\"pink_span\">int(\u6574\u6570\u578b)\u3068float(\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u578b)<\/span>\u306e\uff12\u3064\u3002<br \/>\n\u6570\u5024\u8a08\u7b97\u3092\u3059\u308b\u3068\u304d\u3084\u6570\u5024\u3092\u5229\u7528\u3057\u305f\u3044\u5834\u5408\u306b\u4f7f\u7528\u3059\u308b\u3002<\/p>\n<h3>int(\u6574\u6570\u578b)\u3001float(\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570)<\/h3>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\n<span class=\"red_span\"># \u6574\u6570\u3068\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570<\/span><br \/>\nage = 25 <strong># \u5909\u6570age\u306bint\u578b\u306e\u6570\u502425\u304c\u683c\u7d0d\u3055\u308c\u308b<\/strong><br \/>\nheight = 175.5 <strong># \u5909\u6570height\u306bfloat\u578b\u306e\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570175.5\u304c\u683c\u7d0d\u3055\u308c\u308b<\/strong><br \/>\nprint(age + 1) <strong># age(25) + 1\u306726\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(height + 1) <strong># height(175.5) + 1\u3067176.5\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p><span class=\"red_span\"># \u8ca0\u306e\u6574\u6570<\/span><br \/>\nvalue = -5 <strong># \u6574\u6570\u306e\u524d\u306b-\u3092\u3064\u3051\u308b\u3068\u8ca0\u306e\u6574\u6570\u304c\u5909\u6570\u306b\u683c\u7d0d\u3055\u308c\u308b<\/strong><br \/>\nprint(value + 1) <strong># -4\u3068\u8868\u793a<\/strong>\n<\/div>\n<\/div>\n<h3>2\u9032\u6570\u30018\u9032\u6570\u300116\u9032\u6570\u3001N\u9032\u6570<\/h3>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\n<span class=\"red_span\"># 2\u9032\u6570\u306f\u6570\u5024\u306e\u524d\u306b0b\u30018\u9032\u6570\u306f0o\u300116\u9032\u6570\u306f0x\u3092\u3064\u3051\u308b<\/span><\/p>\n<p>age = 0b111 <strong># \u3053\u306e\u5834\u5408\u3001\u53f3\u8fba\u306f2\u9032\u6570\u306e\u305f\u3081\u3001\u5909\u6570age\u306b\u306f7\u304c\u683c\u7d0d\u3055\u308c\u308b<\/strong><br \/>\nage = 0o11 <strong># \u3053\u306e\u5834\u5408\u3001\u53f3\u8fba\u306f8\u9032\u6570\u306e\u305f\u3081\u3001\u5909\u6570age\u306b\u306f9\u304c\u683c\u7d0d\u3055\u308c\u308b<\/strong><br \/>\nage = 0x11 <strong># \u3053\u306e\u5834\u5408\u3001\u53f3\u8fba\u306f16\u9032\u6570\u306e\u305f\u3081\u3001\u5909\u6570age\u306b\u306f17\u304c\u683c\u7d0d\u3055\u308c\u308b<\/strong><\/p>\n<p><span class=\"red_span\">2\u9032\u6570\u306e\u6570\u5024\u3092\u6587\u5b57\u5217\u306b\u3059\u308b\u306b\u306f\u3001bin(\u6570\u5024)\u30018\u9032\u6570\u306e\u5834\u5408\u306foct(\u6570\u5024)\u300116\u9032\u6570\u306e\u5834\u5408\u306fhex(\u6570\u5024)\u3092\u7528\u3044\u308b<\/span><\/p>\n<p>print(bin(15))<strong> # \u3053\u306e\u5834\u5408\u30012\u9032\u6570\u3068\u3057\u3066'0b1111'\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(oct(15))<strong> # \u3053\u306e\u5834\u5408\u30018\u9032\u6570\u3068\u3057\u3066'0o17'\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(hex(15))<strong> # \u3053\u306e\u5834\u5408\u300116\u9032\u6570\u3068\u3057\u3066'0xf'\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p><span class=\"red_span\"># \u6570\u5024\u3068\u6587\u5b57\u306e\u5217\u3092int\u306b\u5909\u63db\u3059\u308b\u5834\u5408<\/span><\/p>\n<p>print(int('f', 16))<strong># \u3053\u306e\u5834\u5408\u300116\u9032\u6570\u3068\u3057\u306615\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(int('python', 36))<strong># \u3053\u306e\u5834\u5408\u300136\u9032\u6570\u3068\u3057\u30661570137287\u3068\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<\/div>\n<\/div>\n<h3>complex(\u8907\u7d20\u6570\u578b)<\/h3>\n<p>&nbsp;<\/p>\n<div class=\"programming-gray\">\n<h4>Example(\u8907\u7d20\u6570\u306e\u8868\u3057\u65b9\uff11)<\/h4>\n<div class=\"programming-inside\">\n<span class=\"red_span\">\u8907\u7d20\u6570\u306f\u3001\u5b9f\u6570\u3068\u865a\u6570\u3092\u542b\u3093\u3060\u6570\u5024\u3067\u3001\u5b9f\u6570\u304c3\u3001\u865a\u6570\u304c2\u306e\u5834\u5408\u3001python\u3067\u306f\u8907\u7d20\u6570\u3068\u3057\u3066\u30013 + 2j\u3068\u8868\u793a\u3059\u308b\u3002<\/span><\/p>\n<p>a = 1 + 3j <strong># \u5b9f\u65701\u3068\u865a\u65703\u306e\u8907\u7d20\u6570<\/strong><br \/>\nb = 3 + 5j <strong># \u5b9f\u65703\u3068\u865a\u65705\u306e\u8907\u7d20\u6570<\/strong><br \/>\nprint(a + b) <strong># \u8907\u7d20\u65704+8j\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(a * b) <strong># \u8907\u7d20\u6570-12+14j\u304c\u8868\u793a\u3055\u308c\u308b<\/strong>\n<\/div>\n<h4>Example(\u8907\u7d20\u6570\u306e\u8868\u3057\u65b9\uff12)<\/h4>\n<div class=\"programming-inside\">\n<span class=\"red_span\">\u8907\u7d20\u6570\u3092\u8868\u3059\u65b9\u6cd5\u3068\u3057\u3066complex\u95a2\u6570\u3092\u4f7f\u3046\u65b9\u6cd5\u3082\u3042\u308b\u3002\u5b9f\u6570\u304c3\u3001\u865a\u6570\u304c2\u306e\u5834\u5408\u3001\u8907\u7d20\u6570\u3068\u3057\u3066\u3001complex(3, 2)\u3068\u3059\u308b<\/span><\/p>\n<p>a = complex(1, 3)<br \/>\nb = complex(3, 5)<br \/>\nprint(a + b) <strong># \u8907\u7d20\u65704+8j\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(a * b) <strong># \u8907\u7d20\u6570-12+14j\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<\/div>\n<\/div>\n<h2 class=\"title-border\"><strong>\u6587\u5b57\u5217\u578b\u306e\u4f7f\u3044\u65b9<\/strong><\/h2>\n<h3>\u6587\u5b57\u5217\u306e\u57fa\u672c<\/h3>\n<p>\u6587\u5b57\u5217\u578b\u306f\u3001\u30c0\u30d6\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3(\"),\u30b7\u30f3\u30b0\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3(')\u3067\u56f2\u3063\u3066\u5ba3\u8a00\u3059\u308b\u3002\u307e\u305f\u3001\"\"\"\uff5e\"\"\"\u3068\u3059\u308b\u3068\u6539\u884c\u3082\u81ea\u7531\u306b\u633f\u5165\u3057\u3066\u5ba3\u8a00\u3067\u304d\u308b\u3002<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\nstr = \"apple\" <strong># \u5909\u6570str\u306b\u6587\u5b57\u5217apple\u304c\u4ee3\u5165\u3055\u308c\u308b<\/strong><br \/>\nprint(str) <strong># apple\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nstr = 'orange'<br \/>\nprint(str) <strong># orange\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p>str = \"\"\"apple<br \/>\norange<br \/>\ngrape<br \/>\n\"\"\"<br \/>\nprint(str) <strong># \u6539\u884c\u3092\u542b\u3093\u3067\u3001apple<\/strong><br \/>\n<strong>orange<\/strong><br \/>\n<strong>grape\u3068\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<\/div>\n<\/div>\n<h3>\u6587\u5b57\u5217\u306e\u5207\u308a\u53d6\u308a<\/h3>\n<p>\u6587\u5b57\u5217\u306f\u30b7\u30fc\u30b1\u30f3\u30b9\u3068\u3044\u3046\u30c7\u30fc\u30bf\u69cb\u9020\u3067\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u3002<br \/>\n<span class=\"pink_span\">\u30b7\u30fc\u30b1\u30f3\u30b9\u3067\u306f\u30011\u30641\u3064\u5024\u3092\u9806\u756a\u306b\u51e6\u7406\u3067\u304d\u308b\u3002<\/span><\/p>\n<p>\u4f8b\u3048\u3070\u3001str = \"apple\"\u3068\u3057\u305f\u5834\u5408\u3001str[0]\u306fa, str[1]\u306fp\u306e\u3088\u3046\u306b\u3001\u6570\u5024\u3067\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3002<br \/>\n\uff08\u9006\u306b\u3001\u6570\u5024\u306f\u30b7\u30fc\u30b1\u30f3\u30b9\u3067\u306a\u3044\u305f\u3081\u3001num = 123\u3068\u3057\u3066\u3082num[0]\u30671\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\uff09<\/p>\n<p>\u4ed6\u306b\u3082\u3001\u4fbf\u5229\u306a\u65b9\u6cd5\u306a\u30a2\u30af\u30bb\u30b9\u306e\u65b9\u6cd5\u304c\u3042\u308b<br \/>\nstr[-1]\u3068\u3057\u305f\u5834\u5408\u3001str\u306e\u6700\u5f8c\u304b\u3089\u6570\u3048\u3066\u4e00\u756a\u76ee\u306e\u5024\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b(apple\u306e\u5834\u5408\u3001e)<br \/>\nstr[0:2]\u3068\u3057\u305f\u5834\u5408\u30011\u756a\u76ee\u30682\u756a\u76ee\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b(apple\u306e\u5834\u5408\u3001ap)<br \/>\nstr[0:5:2]\u3068\u3057\u305f\u5834\u5408\u30011\u756a\u76ee\u304b\u30894\u756a\u76ee\u307e\u30671\u3064\u98db\u3070\u3057\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b(apple\u306e\u5834\u5408\u3001ape)\u3002<br \/>\nstr[:3]\u3068\u3057\u305f\u5834\u5408\u3001\u521d\u3081\u304b\u30893\u756a\u76ee\u307e\u3067\u306e\u30011,2,3\u756a\u76ee\u306e\u8981\u7d20\u3092\u53d6\u308a\u51fa\u3059(apple\u306e\u5834\u5408app)<br \/>\nstr[3:]\u3068\u3057\u305f\u5834\u5408\u306f\u30014\u756a\u76ee\u304b\u3089\u6700\u5f8c\u306e\u8981\u7d20\u307e\u3067\u3092\u53d6\u308a\u51fa\u3059(apple\u306e\u5834\u5408\u3001le)<br \/>\nstr[-1::-1]\u306e\u5834\u5408\u3001\u6700\u5f8c\u304b\u3089\u4e00\u3064\u305a\u3068\u623b\u3063\u3066\u9006\u9806\u306b\u8868\u793a\u3055\u308c\u308b(apple\u306e\u5834\u5408\u3001elppa)<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\n<p>str = \"apple\"<br \/>\nprint(str[0]) <strong># a\u3068\u8868\u793a<\/strong><br \/>\nprint(str[ 1]) <strong># p\u3068\u8868\u793a<\/strong><br \/>\nprint(str[-1]) <strong># e\u3068\u8868\u793a<\/strong><br \/>\nprint(str[0:2]) <strong># ap\u3068\u8868\u793a<\/strong><br \/>\nprint(str[0:2]) <strong># ap\u3068\u8868\u793a<\/strong><br \/>\nprint(str[0:5:2]) <strong># ape\u3068\u8868\u793a<\/strong><br \/>\nprint(str[:3]) <strong># app\u3068\u8868\u793a<\/strong><br \/>\nprint(str[3:]) <strong># le\u3068\u8868\u793a<\/strong><br \/>\nprint(str[-1::-1]) <strong># elppa\u3068\u8868\u793a\u3055\u308c\u308b<\/strong>\n<\/div>\n<\/div>\n<h3>\u6587\u5b57\u5217\u306e\u9023\u7d50<\/h3>\n<p>\u6587\u5b57\u5217\u306f\u3001\u6570\u5b57\u306e\u8a08\u7b97\u3092\u3059\u308b\u3088\u3046\u306b\u6587\u5b57\u5217+\u6587\u5b57\u5217\u3068\u3059\u308b\u3053\u3068\u3067\u9023\u7d50\u3067\u304d\u308b\u3002<br \/>\n\u307e\u305f\u3001\u6587\u5b57\u5217 * N\u3068\u3057\u3066N\u306b\u6570\u5b57\u3092\u5165\u308c\u308b\u3068\u6587\u5b57\u5217\u3092N\u56de\u7e70\u308a\u8fd4\u3059\u6587\u5b57\u5217\u306b\u306a\u308b\u3002<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\n<p>str1 = \"apple \" <strong># \u5909\u6570str1\u306b\u6587\u5b57\u5217apple \u304c\u683c\u7d0d\u3055\u308c\u308b<\/strong><br \/>\nstr2 = \"pen\"\u3000<strong># \u5909\u6570str2\u306b\u6587\u5b57\u5217pen\u304c\u683c\u7d0d\u3055\u308c\u308b<\/strong><br \/>\nstr3 = str1 + str2 <strong># \u5909\u6570str3\u306b\u5909\u6570str1\u3068str2\u3092\u9023\u7d50\u3057\u305f\u6587\u5b57\u5217(apple pen)\u304c\u683c\u7d0d\u3055\u308c\u308b<\/strong><\/p>\n<p>str4 = str1 * 10 <strong># \u5909\u6570str4\u306b\u6587\u5b57\u5217apple\u304c10\u56de\u7e70\u308a\u8fd4\u3057\u3066\u683c\u7d0d\u3055\u308c\u308b<\/strong><\/p>\n<p>print(str3) <strong># apple pen\u3068\u8868\u793a<\/strong><br \/>\nprint(str4) <strong># apple \u00d7 10\u56de\u8868\u793a<\/strong><\/p>\n<\/div>\n<\/div>\n<h3>\u6587\u5b57\u5217\u306e\u533a\u5207\u308a(join)<\/h3>\n<p>\u6587\u5b57\u5217\u306e1\u6587\u5b57\u30011\u6587\u5b57\u306e\u9593\u306b\u533a\u5207\u308a\u3092\u5165\u308c\u308b\u65b9\u6cd5\u3082\u3042\u308b\u3002<br \/>\n\u4f8b\u3048\u3070\u3001apple\u306e1\u6587\u5b571\u6587\u5b57\u306e\u9593\u306b\u7a7a\u767d\u3092\u5165\u308c\u3066\u3001a p p l e\u3068\u3057\u305f\u3044\u5834\u5408\u3001\" \".join(\"apple\")\u3068\u3059\u308b\u3002<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\n<p>str = \"apple\"<br \/>\nprint(\" \".join(str)) <strong># apple\u306b\u7a7a\u767d\u533a\u5207\u308a\u304c\u633f\u5165\u3055\u308c\u3066a p p l e\u3068\u306a\u308b<\/strong><\/p>\n<\/div>\n<\/div>\n<h3>\u30b3\u30fc\u30c9\u5909\u63db\u95a2\u6570(encode, decode)<\/h3>\n<p>\u6587\u5b57\u5217\u3092\u305d\u306e\u307e\u307e\u6587\u5b57\u5217\u3068\u3057\u3066\u6301\u305f\u305a\u306b\u3001\u30b3\u30fc\u30c9(utf8,shift-JIS\u7b49)\u3092\u6307\u5b9a\u3057\u3066\u3001\u7b26\u53f7\u5316\u3057\u3066byte\u306e\u914d\u5217\u3068\u3057\u3066\u6301\u3064\u5834\u5408\u304c\u3042\u308b\u3002<br \/>\n\u307e\u305f\u3001byte\u306e\u914d\u5217\u3092\u6587\u5b57\u5217\u306b\u623b\u3059\u3053\u3068\u3092\u5fa9\u53f7\u3068\u3044\u3046\u3002<br \/>\n\u3053\u306e\u969b\u306b\u5229\u7528\u3059\u308b\u95a2\u6570\u304cencode\u3068decode\u3002<\/p>\n<p>\u6587\u5b57\u5217\u3092\u578b\u3067\u6307\u5b9a\u3057\u3066\u4fdd\u5b58\u3059\u308b\u3068\u304d\u3001\u6587\u5b57\u5316\u3051\u3092\u9632\u3050\u3068\u304d\u306a\u3069\u306b\u5229\u7528\u3059\u308b\u3002<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\n<p>str = \"\u308a\u3093\u3054\"<br \/>\nstr_encode = str.encode(\"utf8\") <strong># \u308a\u3093\u3054\u3092utf8\u3067\u7b26\u53f7\u5316\u3057\u3066\u3001\u5909\u6570str_encode\u306b\u683c\u7d0d\u3059\u308b<\/strong><\/p>\n<p>print(str_encode) <strong># \u308a\u3093\u3054\u3092utf8\u3067\u7b26\u53f7\u5316\u3057\u305fbyte\u6587\u5b57\u5217\u306eb'\\xe3\\x82\\x8a\\xe3\\x82\\x93\\xe3\\x81\\x94'\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p>print(str_encode.decode(\"utf8\")) <strong># \u7b26\u53f7\u5316\u3055\u308c\u305f\u6587\u5b57\u5217\u304c\u5fa9\u53f7\u5316\u3055\u308c\u308a\u3093\u3054\u3068\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(str_encode.decode(\"cp932\")) <strong># \u5225\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u3067\u5fa9\u53f7\u3059\u308b\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308b(cp932\u306fShift-JIS)<\/strong><\/p>\n<\/div>\n<\/div>\n<h3>\u6587\u5b57\u5217\u691c\u7d22\u95a2\u6570(count)<\/h3>\n<p>\u6587\u5b57\u5217\u4e2d\u306b\u73fe\u308c\u308b\u3042\u308b\u6587\u5b57\u306e\u6570\u3092\u691c\u7d22\u3057\u3066\u56de\u6570\u3092\u8abf\u3079\u308b\u5834\u5408\u3001count\u95a2\u6570\u3092\u7528\u3044\u308b<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\n<p>str = \"apple\"<br \/>\nprint(str.count(\"p\")) <strong># str\u306e\u4e2d\u306bp\u306f2\u56de\u51fa\u3066\u304f\u308b\u305f\u3081\u30012\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(str.count(\"pl\")) <strong># str\u306e\u4e2d\u306bpl\u306f1\u56de\u51fa\u3066\u304f\u308b\u305f\u3081\u30011\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<\/div>\n<\/div>\n<h3>\u6587\u5b57\u5217\u306e\u95a2\u6570(startswith, endwith)<\/h3>\n<p>\u6587\u5b57\u5217\u304c\u3042\u308b\u6587\u5b57\u5217\u304b\u3089\u59cb\u307e\u3063\u3066\u3044\u308b\u307e\u305f\u306f\u3001\u7d42\u308f\u3063\u3066\u3044\u308b\u306e\u304b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306e\u95a2\u6570\u3068\u3057\u3066startswith\u3068endwith\u304c\u3042\u308b<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\n<p>str = \"apple\"<br \/>\nprint(str.startswith(\"ap\")) <strong># str(\"apple\")\u306fap\u3067\u59cb\u307e\u308b\u305f\u3081\u3001True\u304c\u8fd4\u3055\u308c\u308b<\/strong><br \/>\nprint(str.startswith(\"ae\")) <strong># str\u306fae\u3067\u306f\u59cb\u307e\u3089\u306a\u3044\u305f\u3081False\u304c\u8fd4\u3055\u308c\u308b<\/strong><br \/>\nprint(str.endswith(\"le\")) <strong># str\u306fae\u3067\u306f\u7d42\u308f\u3089\u306a\u3044\u305f\u3081False\u304c\u8fd4\u3055\u308c\u308b<\/strong><br \/>\nprint(str.endswith(\"ae\")) <strong># str\u306fae\u3067\u306f\u7d42\u308f\u3089\u306a\u3044\u305f\u3081False\u304c\u8fd4\u3055\u308c\u308b<\/strong><\/p>\n<\/div>\n<\/div>\n<h3>\u6587\u5b57\u5217\u306e\u5206\u89e3\u95a2\u6570(split, rsplit, splitlines)<\/h3>\n<p>\u6587\u5b57\u5217\u3092\u5206\u5272\u3059\u308b\u95a2\u6570\u3068\u3057\u3066\u3001split,rsplit,splitlines\u304c\u3042\u308b\u3002<br \/>\nsplit\u306f\u6587\u5b57\u5217\u306e\u5de6\u304b\u3089\u6307\u5b9a\u306e\u6587\u5b57\u5217\u3067\u5206\u5272\u3057\u3001rsplit\u306f\u6587\u5b57\u5217\u306e\u53f3\u304b\u3089\u6307\u5b9a\u306e\u6587\u5b57\u5217\u3067\u5206\u5272\u3057\u3001splitlines\u306f\u6539\u884c\u3092\u5206\u5272\u3057\u3066\u914d\u5217\u3068\u3057\u3066\u683c\u7d0d\u3059\u308b<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\n<p>str = \"apple,orange,grape\"<br \/>\nprint(str.split(\",\")) <strong># str\u304c\",\"\u3067\u5206\u5272\u3055\u308c\u3001['apple', 'orange', 'grape']\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(str.split(\",\", 1)) <strong># str\u304c\",\"\u3067\u5de6\u304b\u30891\u3064\u5206\u5272\u3055\u308c\u3001['apple', 'orange,grape']\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(str.rsplit(\",\")) <strong># str\u304c\",\"\u3067\u53f3\u304b\u3089\u5206\u5272\u3055\u308c['apple', 'orange', 'grape']\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(str.rsplit(\",\", 1)) <strong># str\u304c\",\"\u3067\u53f3\u304b\u30891\u3064\u5206\u5272\u3055\u308c['apple,orange', 'grape']\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p>str = \"\"\"apple<br \/>\norange<br \/>\ngrape\"\"\"<br \/>\nprint(str.splitlines()) <strong># str\u304c\u6539\u884c\u3067\u5206\u5272\u3055\u308c['apple', 'orange', 'grape']\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p><span class=\"red_span\">#\u3061\u306a\u307f\u306bsplit\u3092\u4f7f\u3063\u3066\u6539\u884c\u3067\u304d\u308b<\/span><br \/>\nprint(str.split('\\n'))<\/p>\n<\/div>\n<\/div>\n<h3>\u6587\u5b57\u5217\u306e\u9664\u53bb\u95a2\u6570(strip, rstrip, lstrip)<\/h3>\n<p>strip\u95a2\u6570\u306f\u3001\u6587\u5b57\u5217\u306e\u4e21\u7aef\u304b\u3089\u6307\u5b9a\u3057\u305f\u6587\u5b57\u3092\u524a\u9664\u3059\u308b\u95a2\u6570\u3002<br \/>\nrstrip\u306e\u5834\u5408\u3001\u6587\u5b57\u5217\u306e\u53f3\u5074\u304b\u3089\u6307\u5b9a\u3057\u305f\u6587\u5b57\u3092\u524a\u9664\u3059\u308b\u3002<br \/>\nlstrip\u306e\u5834\u5408\u3001\u6587\u5b57\u5217\u306e\u5de6\u5074\u304b\u3089\u6307\u5b9a\u3057\u305f\u6587\u5b57\u3092\u524a\u9664\u3059\u308b\u3002<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\nstr = \" apple grape \"<br \/>\nsplited_str = str.strip() <strong># strip\u95a2\u6570\u3092\u7a7a\u767d\u3067\u547c\u3073\u51fa\u3059\u3068\u3001<span class=\"pink_span\">\u4e21\u7aef\u304b\u3089<\/span>\u7a7a\u767d\u3092\u524a\u9664\u3057\u305f\u6587\u5b57\u5217\u3092\u8fd4\u3059 <\/strong><br \/>\nprint(splited_str) <strong># \"apple grape\"\u3068\u8868\u793a\u3055\u308c\u308b <\/strong><\/p>\n<p>str = \" apple grape \"<br \/>\nsplited_str = str.lstrip() <strong># lstrip\u95a2\u6570\u3092\u7a7a\u767d\u3067\u547c\u3073\u51fa\u3059\u3068\u3001<span class=\"pink_span\">\u5de6\u7aef\u304b\u3089<\/span>\u7a7a\u767d\u3092\u524a\u9664\u3057\u305f\u6587\u5b57\u5217\u3092\u8fd4\u3059 <\/strong><br \/>\nprint(splited_str) <strong># \"apple grape \"\u3068\u8868\u793a\u3055\u308c\u308b <\/strong><\/p>\n<p>str = \" apple grape \"<br \/>\nsplited_str = str.rstrip() <strong># rstrip\u95a2\u6570\u3092\u7a7a\u767d\u3067\u547c\u3073\u51fa\u3059\u3068\u3001<span class=\"pink_span\">\u53f3\u7aef\u304b\u3089<\/span>\u7a7a\u767d\u3092\u524a\u9664\u3057\u305f\u6587\u5b57\u5217\u3092\u8fd4\u3059 <\/strong><br \/>\nprint(splited_str) <strong># \" apple grape\"\u3068\u8868\u793a\u3055\u308c\u308b <\/strong><\/p>\n<p>str = \"abcdefghijklmn\"<br \/>\nsplited_str = str.strip(\"abdmn\") <strong># \u6587\u5b57\u5217\u3092\u5f15\u6570\u306b\u3057\u3066\u547c\u3073\u51fa\u3059\u3068\u3001<span class=\"pink_span\">\u4e21\u7aef\u304b\u3089\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217<\/span>\u3092\u524a\u9664\u3057\u305f\u6587\u5b57\u5217\u3092\u8fd4\u3059 <\/strong><br \/>\nprint(splited_str) <strong># \u5de6\u304b\u3089a\u3068b,\u53f3\u304b\u3089m\u3068n\u304c\u524a\u9664\u3055\u308c\u3001\"cdefghijkl\"\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p>str = \"abcdefghijklmn\"<br \/>\nsplited_str = str.lstrip(\"abdmn\") <strong># lstrip\u95a2\u6570\u306e\u5834\u5408\u3001<span class=\"pink_span\">\u5de6\u7aef\u304b\u3089\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217<\/span>\u3092\u524a\u9664\u3057\u305f\u6587\u5b57\u5217\u3092\u8fd4\u3059<\/strong><br \/>\nprint(splited_str) <strong># a\u3068b\u304c\u524a\u9664\u3055\u308c\u3001\"cdefghijklmn\"\u304c\u8868\u793a\u3055\u308c\u308b <\/strong><\/p>\n<p>str = \"abcdefghijklmn\"<br \/>\nsplited_str = str.rstrip(\"abdmn\") # rstrip\u95a2\u6570\u306e\u5834\u5408\u3001<span class=\"pink_span\">\u53f3\u7aef\u304b\u3089\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217<\/span>\u3092\u524a\u9664\u3057\u305f\u6587\u5b57\u5217\u3092\u8fd4\u3059<\/strong><br \/>\nprint(splited_str) <strong># m\u3068n\u304c\u524a\u9664\u3055\u308c\u3001\"abcdefghijkl\"\u304c\u8868\u793a\u3055\u308c\u308b<\/strong>\n<\/div>\n<\/div>\n<h3>\u6587\u5b57\u5217\u306e\u5909\u63db\u95a2\u6570(upper, lower, swapcase, replace, capitalize, capitalize)<\/h3>\n<p>\u6587\u5b57\u5217\u3092\u5225\u306e\u6587\u5b57\u5217\u306b\u5909\u63db\u3059\u308b\u95a2\u6570\u3082\u305f\u304f\u3055\u3093\u3042\u308b\u3002<br \/>\n\u305d\u308c\u305e\u308c\u306e\u4f7f\u3044\u304b\u305f\u3092\u4ee5\u4e0b\u306b\u7d39\u4ecb\u3059\u308b\u3002<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\n<p><span class=\"red_span\"># upper\u30e1\u30bd\u30c3\u30c9\u306f\u6587\u5b57\u5217\u3092\u5927\u6587\u5b57\u306b\u3001lower\u30e1\u30bd\u30c3\u30c9\u306f\u5c0f\u6587\u5b57\u306b\u3059\u308b<\/span><br \/>\nstr = \"apple grape two_apples BANANA\"<br \/>\nprint(str.upper()) <strong># \"APPLE GRAPE TWO_APPLES BANANA\"\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(str.lower()) <strong># \"apple grape two_apples banana\"\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p><span class=\"red_span\"># swapcase\u306f\u5927\u6587\u5b57\u3092\u5c0f\u6587\u5b57\u306b\u3001\u5c0f\u6587\u5b57\u3092\u5927\u6587\u5b57\u306b\u3059\u308b<\/span><br \/>\nprint(str.swapcase()) <strong># \"APPLE GRAPE TWO_APPLES banana\"\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p><span class=\"red_span\"># replace\u306f\u7b2c\uff11\u5f15\u6570\u306e\u6587\u5b57\u5217\u3092\u7b2c\uff12\u5f15\u6570\u306e\u6587\u5b57\u5217\u306b\u5909\u63db\u3059\u308b<\/span><br \/>\nprint(str.replace(\"ap\", \"XX\")) <strong># \"XXple grXXe two_XXples BANANA\"\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p><span class=\"red_span\"># capitalize\u306f\u6700\u521d\u306e\u6587\u5b57\u3092\u5927\u6587\u5b57\u306b\u3001\u305d\u308c\u4ee5\u5916\u3092\u5c0f\u6587\u5b57\u306b\u3059\u308b<\/span><br \/>\nprint(str.capitalize()) <strong># \"Apple grape two_apples banana\"\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p><span class=\"red_span\"># title\u306f\u5358\u8a9e\u306e\u6700\u521d\u3092\u5927\u6587\u5b57\u306b\u305d\u308c\u4ee5\u5916\u3092\u5c0f\u6587\u5b57\u306b\u3059\u308b<\/span><br \/>\nprint(str.title()) <strong># \"Apple Grape Two_Apples Banana\"\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<\/div>\n<\/div>\n<h3>\u6587\u5b57\u5217\u306e\u691c\u7d22(find, index, rfind, rindex)<\/h3>\n<p>find\u3068index\u306f\u3001\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u304c\u4f55\u756a\u76ee\u306b\u3042\u308b\u306e\u304b\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8fd4\u3059\u30e1\u30bd\u30c3\u30c9\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u6587\u5b57\u5217\u304c\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u5834\u5408\u3001<span class=\"pink_span\">find\u306f-1,index\u306fValueError\u3092\u8fd4\u3059<\/span>\u70b9\u304c\u7570\u306a\u308b\u3002<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\n<p>str = \"apple grape two_apples BANANA\"<br \/>\nprint(str.find(\"apple\")) <strong># apple\u3092\u5de6\u304b\u3089\u691c\u7d22\u3057\u30a4\u30f3\u30c7\u30c3\u30af\u30b9(0)\u3092\u8fd4\u3059(index\u3082\u540c\u69d8)<\/strong><br \/>\nprint(str.rfind(\"apple\")) <strong># apple\u3092\u53f3\u304b\u3089\u691c\u7d22\u3057\u30a4\u30f3\u30c7\u30c3\u30af\u30b9(16)\u3092\u8fd4\u3059(rindex\u3082\u540c\u69d8)<\/strong><\/p>\n<p>print(str.find(\"lemon\")) <strong># \u691c\u7d22\u3057\u3066\u3082\u898b\u3064\u304b\u3089\u306a\u3044\u305f\u3081\u3001-1\u3092\u8fd4\u3059<\/strong><br \/>\nprint(str.index(\"lemon\")) <strong># \u691c\u7d22\u3057\u3066\u3082\u898b\u3064\u304b\u3089\u306a\u3044\u305f\u3081\u3001ValueError\u304c\u767a\u751f\u3059\u308b<\/strong><\/p>\n<\/div>\n<\/div>\n<h3>\u6587\u5b57\u5217\u306e\u6761\u4ef6\u95a2\u6570(islower, isupper)<\/h3>\n<p>islower\u306f\u3001<span class=\"pink_span\">\u6587\u5b57\u5217\u304c\u5168\u3066\u5c0f\u6587\u5b57\u306e\u5834\u5408<\/span>True\u3092\u8fd4\u3057\u3001\u305d\u308c\u4ee5\u5916\u306fFalse\u3092\u8fd4\u3059\u3002<br \/>\nisupper\u306f\u3001<span class=\"pink_span\">\u6587\u5b57\u5217\u304c\u5168\u3066\u5927\u6587\u5b57\u306e\u5834\u5408<\/span>True\u3092\u8fd4\u3057\u3001\u305d\u308c\u4ee5\u5916\u306fFalse\u3092\u8fd4\u3059\u3002<\/p>\n<div class=\"programming-gray\">\n<h4>Example<\/h4>\n<div class=\"programming-inside\">\nupper_str = \"APPLE\"<br \/>\nlower_str = \"apple\"<\/p>\n<p>print(upper_str.isupper()) <strong># \u5168\u3066\u5927\u6587\u5b57\u306e\u305f\u3081\u3001True\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(upper_str.islower()) <strong># False\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<p>print(lower_str.isupper()) <strong># False\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><br \/>\nprint(lower_str.islower()) <strong># \u5168\u3066\u5c0f\u6587\u5b57\u306e\u305f\u3081\u3001True\u304c\u8868\u793a\u3055\u308c\u308b<\/strong><\/p>\n<\/div>\n<\/div>\n<h3>\u305d\u306e\u4ed6<\/h3>\n<p>\u6587\u5b57\u5217\u578b\u306e\u6301\u3063\u3066\u3044\u308b\u3001\u4ed6\u306b\u3082\u30e1\u30bd\u30c3\u30c9\u306f\u4ee5\u4e0b\u53c2\u7167<br \/>\n<a href=\"https:\/\/docs.python.jp\/3\/library\/stdtypes.html\">\u516c\u5f0f\u30b5\u30a4\u30c8<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>python\u3067\u5229\u7528\u3059\u308b\u91cd\u8981\u306a\u578b\u3068\u3057\u3066\u8ad6\u7406\u578b\u3001\u6570\u5024\u578b\u3001\u6587\u5b57\u5217\u578b\u304c\u3042\u308b\u304c\u3001\u4ee5\u4e0b\u306b\u305d\u308c\u305e\u308c\u306e\u8aac\u660e\u3092\u3059\u308b\u3002 \u8ad6\u7406\u578b\u306e\u4f7f\u3044\u65b9 python\u306e\u8ad6\u7406\u578b\u306fbool\u3068\u3044\u3046\u578b\u3067\u3001\u300cTrue\u300d\u3068\u300cFalse\u300d\u306e2\u3064\u306e\u5024\u3060\u3051\u304c\u3042\u308b\u3002 \u3053\u308c\u306f\u3001\u4e3b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_uag_custom_page_level_css":"","_uf_show_specific_survey":0,"_uf_disable_surveys":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[9,219],"tags":[14,51,49,53,52,50],"class_list":{"0":"post-269","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-python","7":"category-it-programming","8":"tag-python","9":"tag-51","10":"tag-49","11":"tag-53","12":"tag-52","13":"tag-50","14":"entry"},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"home-middle":false,"home-top":false,"sidebar-thumbnail":false},"uagb_author_info":{"display_name":"9nmatsumoto","author_link":"https:\/\/www.nblog09.com\/w\/author\/9nmatsumoto\/"},"uagb_comment_info":0,"uagb_excerpt":"python\u3067\u5229\u7528\u3059\u308b\u91cd\u8981\u306a\u578b\u3068\u3057\u3066\u8ad6\u7406\u578b\u3001\u6570\u5024\u578b\u3001\u6587\u5b57\u5217\u578b\u304c\u3042\u308b\u304c\u3001\u4ee5\u4e0b\u306b\u305d\u308c\u305e\u308c\u306e\u8aac\u660e\u3092\u3059\u308b\u3002 \u8ad6\u7406\u578b\u306e\u4f7f&hellip;","_links":{"self":[{"href":"https:\/\/www.nblog09.com\/w\/wp-json\/wp\/v2\/posts\/269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nblog09.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nblog09.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nblog09.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nblog09.com\/w\/wp-json\/wp\/v2\/comments?post=269"}],"version-history":[{"count":61,"href":"https:\/\/www.nblog09.com\/w\/wp-json\/wp\/v2\/posts\/269\/revisions"}],"predecessor-version":[{"id":3543,"href":"https:\/\/www.nblog09.com\/w\/wp-json\/wp\/v2\/posts\/269\/revisions\/3543"}],"wp:attachment":[{"href":"https:\/\/www.nblog09.com\/w\/wp-json\/wp\/v2\/media?parent=269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nblog09.com\/w\/wp-json\/wp\/v2\/categories?post=269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nblog09.com\/w\/wp-json\/wp\/v2\/tags?post=269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}