{"id":536,"date":"2018-08-10T11:45:06","date_gmt":"2018-08-10T02:45:06","guid":{"rendered":"https:\/\/python-introduction.com\/?p=536"},"modified":"2018-08-10T11:45:06","modified_gmt":"2018-08-10T02:45:06","slug":"%e3%80%90python%e3%80%91%e6%bc%94%e7%ae%97%e5%ad%90%e3%81%be%e3%81%a8%e3%82%81","status":"publish","type":"post","link":"https:\/\/python-introduction.com\/?p=536","title":{"rendered":"\u3010Python\u3011\u6f14\u7b97\u5b50\u307e\u3068\u3081"},"content":{"rendered":"<div class=\"boxstyle01\">\n<p class=\"check08\"><span style=\"color: #ff0000;\">\u3053\u306e\u8a18\u4e8b\u3067\u306fPython\u3067\u4f7f\u3046<\/span><\/p>\n<p>\u30fb\u4ee3\u5165\u6f14\u7b97\u5b50<br \/>\n\u30fb\u6bd4\u8f03\u6f14\u7b97\u5b50<br \/>\n\u30fb\u8ad6\u7406\u6f14\u7b97\u5b50<br \/>\n\u30fb\u4e09\u9805\u6f14\u7b97\u5b50<\/p>\n<\/div>\n<p>\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u4e00\u822c\u7684\u306a\u8a08\u7b97\u306b\u3064\u3044\u3066\u306f<br \/>\n\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u306e\u3067<br \/>\n\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"linkcard\"><table border=\"1\" cellspacing=\"0\" cellpadding=\"4\"><tbody><\/tr><tr><td>\u4eca\u56de\u306fpython\u3067\u6570\u5024\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002\u3010python\u5165\u9580\u3011\u7c21\u5358\u306a\u6570\u5024\u8a08\u7b97\u307e\u305a\u306f\u8db3\u3057\u7b97\u5f15\u304d\u7b97\u304b\u3089\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002print(50+32)print(50-23) \u4e0a\u8a18\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3001\u8db3\u3057\u7b97\u5f15\u304d\u7b97\u306f\u5c0f\u5b66\u6821\u3067\u3084\u308b\u3088\u3046\u306a\u8a08\u7b97\u5f0f\u3067\u3067\u304d\u307e\u3059\u3002\u5b9f\u884c\u3059\u308b\u3068\u5f53\u305f\u308a\u524d\u306e\u7d50\u679c\u304c\u8fd4\u3063\u3066...<br><a class=\"no_icon\" href=\"https:\/\/python-introduction.com\/?p=190\">python\u3067\u6570\u5024\u8a08\u7b97\u3059\u308b\u65b9\u6cd5<\/a> - python\u5165\u9580\u30c9\u30c3\u30c8\u30b3\u30e0<\/td><\/tr><\/tbody><\/table><\/div>\n<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#Python\"><span class=\"toc_number toc_depth_1\">1<\/span> \u3010Python\u5165\u9580\u3011\u4ee3\u5165\u6f14\u7b97\u5b50\u307e\u3068\u3081<\/a><\/li><li><a href=\"#Python-2\"><span class=\"toc_number toc_depth_1\">2<\/span> \u3010Python\u5165\u9580\u3011\u6bd4\u8f03\u6f14\u7b97\u5b50\u307e\u3068\u3081<\/a><\/li><li><a href=\"#Python-3\"><span class=\"toc_number toc_depth_1\">3<\/span> \u3010Python\u5165\u9580\u3011\u8ad6\u7406\u6f14\u7b97\u5b50\u307e\u3068\u3081<\/a><\/li><li><a href=\"#Python-4\"><span class=\"toc_number toc_depth_1\">4<\/span> \u3010Python\u5165\u9580\u3011\u4e09\u9805\u6f14\u7b97\u5b50\u307e\u3068\u3081<\/a><\/li><li><a href=\"#Python-5\"><span class=\"toc_number toc_depth_1\">5<\/span> Python\u3067\u4f7f\u3046\u6f14\u7b97\u5b50\u307e\u3068\u3081<\/a><\/li><\/ul><\/div>\n<h2><span id=\"Python\">\u3010Python\u5165\u9580\u3011\u4ee3\u5165\u6f14\u7b97\u5b50\u307e\u3068\u3081<\/span><\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-541\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/dentaksan808.jpg\" alt=\"\u4ee3\u5165\u6f14\u7b97\u5b50\" width=\"620\" height=\"405\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/dentaksan808.jpg 620w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/dentaksan808-300x196.jpg 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/p>\n<p>\u4ee3\u5165\u6f14\u7b97\u5b50\u306f\u300e\uff1d\uff08\u30a4\u30b3\u30fc\u30eb\uff09\u300f\u3092\u4f7f\u3063\u3066<br \/>\n\u5024\u3092\u4ee3\u5165\u3057\u3066\u884c\u3046\u6f14\u7b97\u5b50\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u6f14\u7b97\u5b50\u3068\u306f\u300e\uff0b\u300f\u3068\u304b\u300e-\u300f\u306a\u3069\u306e<br \/>\n\u8a08\u7b97\u3092\u610f\u5473\u3059\u308b\u8a18\u53f7\u306e\u3053\u3068\u3092\u3044\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u3001\u4ee3\u5165\u6f14\u7b97\u5b50\u3068\u3044\u3046\u3053\u3068\u306f<br \/>\n\u300e\uff1d\u300f\u306f\u5fc5\u9808\u3067\u3001\u4ed6\u306b\u300e\uff0b\u300f\u3068\u304b\u300e\uff05\u300f\u306a\u3069\u306e<br \/>\n\u6f14\u7b97\u5b50\u304c\u5fc5\u305a\u767b\u5834\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u4f8b\u984c\u3092\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<br \/>\n\u307e\u305a\u306f\u5927\u539f\u5247\u304b\u3089\u3067\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c1\r\nc = 966\r\nprint(c)<\/pre>\n<p>=\u306e\u5de6\u5074\u306b\u5909\u6570c\u304c\u3042\u3063\u3066<br \/>\n=\u306e\u53f3\u5074\u306b\u6570\u5b57\u306e966\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u3001=\u306e\u53f3\u5074\u306e\u6570\u5b57966\u304c<br \/>\n=\u306e\u5de6\u5074\u306e\u5909\u6570c\u306b\u4ee3\u5165\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066print\u3067\u5909\u6570c\u306b\u4ee3\u5165\u3055\u308c\u305f966\u3068\u3044\u3046\u6570\u5b57\u3092<br \/>\n\u8868\u793a\u3055\u305b\u307e\u3059\u3002<\/p>\n<p>\u7d50\u679c\u306f\u3053\u306e\u3088\u3046\u306b966\u3068\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u306d\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-542\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/hennsuu808.jpg\" alt=\"\u4ee3\u5165\u6f14\u7b97\u5b50\" width=\"184\" height=\"93\" \/><\/p>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u4ee3\u5165\u304c\u95a2\u4fc2\u3059\u308b\u6f14\u7b97\u5b50\u3092\u4ee3\u5165\u6f14\u7b97\u5b50\u3068\u3044\u3063\u3066<br \/>\n\u4ee3\u8868\u7684\u306a\u4ee3\u5165\u6f14\u7b97\u5b50\u304c\u300e=\u300f\u3067\u3059\u3002<\/p>\n<p>\u300c\u4ee3\u5165\u3063\u3066\u4f55\uff1f\u300d<br \/>\n\u3068\u7591\u554f\u306b\u611f\u3058\u3066\u3057\u307e\u3063\u305f\u65b9\u306f<br \/>\n\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<br \/>\n\u21d2<a href=\"https:\/\/python-introduction.com\/?p=416\" target=\"blank\">\u3010Python\u5165\u9580\u3011\u5909\u6570\u306e\u4ee3\u5165\u306b\u3064\u3044\u3066\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac<\/a><\/p>\n<p>\u4ee3\u5165\u6f14\u7b97\u5b50\u306b\u306f<br \/>\n\u5358\u7d14\u306a\u300e=\u300f\u4ee5\u5916\u306b\u3082\u4ee5\u4e0b\u306e\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p class=\"check08\">\u4ee3\u5165\u6f14\u7b97\u5b501\uff0e\u8db3\u3057\u3066\u4ee3\u5165\u3059\u308b+=<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c2\r\n\r\na = 100\r\nb = 30\r\n\r\na += b\r\nprint(a)<\/pre>\n<p>\u4f8b\u984c2\u3067\u3001+=\u306f<br \/>\na\u306e\u5024\uff08100\uff09\u306bb\u306e\u5024\uff0830\uff09\u3092\u8db3\u3057\u3066<br \/>\n\u305d\u306e\u3042\u3068\u3001\u5909\u6570a\u306b\u4ee3\u5165\u3059\u308b\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067print(a)\u3068\u3059\u308b\u3053\u3068\u3067<br \/>\n\u5909\u6570a\u306b\u5165\u3063\u305f100+30\uff1d130\u3068\u3044\u3046\u5024\u304c<br \/>\n\u8868\u793a\u3055\u308c\u308b\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u3057\u305f\u304c\u3063\u3066\u7b54\u3048\u306f130\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-544\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/purasuikoru808.jpg\" alt=\"\u4ee3\u5165\u6f14\u7b97\u5b50\" width=\"237\" height=\"162\" \/><\/p>\n<p class=\"check08\">\u4ee3\u5165\u6f14\u7b97\u5b502\uff0e\u5f15\u3044\u3066\u4ee3\u5165\u3059\u308b-=<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c3\r\n\r\na = 100\r\nb = 30\r\n\r\na -= b\r\nprint(a)<\/pre>\n<p>\u4f8b\u984c3\u3067\u306f\u300e-=\u300f\u3068\u3044\u3046\u4ee3\u5165\u6f14\u7b97\u5b50\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n-=\u306fa\uff08100\uff09\u304b\u3089b(30)\u3092\u5f15\u3044\u306670\u306b\u306a\u3063\u305f\u72b6\u614b\u3067<br \/>\na\u306b\u4ee3\u5165\u3059\u308b\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002<\/p>\n<p>\u3057\u305f\u304c\u3063\u3066\u5b9f\u884c\u3059\u308b\u306870\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-545\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/dainyuuhikuikoru807.jpg\" alt=\"\u4ee3\u5165\u6f14\u7b97\u5b50\" width=\"218\" height=\"159\" \/><\/p>\n<p class=\"check08\">\u4ee3\u5165\u6f14\u7b97\u5b503\uff0e\u304b\u3051\u3066\u304b\u3089\u4ee3\u5165\u3059\u308b*=<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c4\r\n\r\na = 100\r\nb = 30\r\n\r\na *= b\r\nprint(a)<\/pre>\n<p>*=\u306f\u5909\u6570a(100)\u3068\u5909\u6570b(30)\u3092\u639b\u3051\u7b97\u3057\u3066<br \/>\n\u305d\u306e\u7d50\u679c\uff083000\uff09\u3092a\u306b\u4ee3\u5165\u3059\u308b\u4ee3\u5165\u6f14\u7b97\u5b50\u3067\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u5b9f\u884c\u3059\u308b\u30683000\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-547\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/dainyuukakeiko808.jpg\" alt=\"\u4ee3\u5165\u6f14\u7b97\u5b50\u304b\u3051\u308b\u30a4\u30b3\u30fc\u30eb\" width=\"242\" height=\"159\" \/><\/p>\n<p class=\"check08\">\u4ee3\u5165\u6f14\u7b97\u5b504\uff0e\u5272\u3063\u3066\u304b\u3089\u4ee3\u5165\u3059\u308b\/=\uff08\u5c0f\u6570\u3067\u308b\uff09<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c5\r\n\r\na = 100\r\nb = 30\r\n\r\na \/= b\r\nprint(a)<\/pre>\n<p>\/=\u306fa\uff08100\uff09\u3092b(30)\u3067\u5272\u3063\u3066<br \/>\n\u305d\u306e\u7b54\u3048\u3092a\u306b\u4ee3\u5165\u3059\u308b\u4ee3\u5165\u6f14\u7b97\u5b50\u3067\u3059\u3002<\/p>\n<p>\u5c0f\u6570\u3082\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-548\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/dainyuuenwaru807.jpg\" alt=\"\u4ee3\u5165\u6f14\u7b97\u5b50\" width=\"244\" height=\"161\" \/><\/p>\n<p class=\"check08\">\u4ee3\u5165\u6f14\u7b97\u5b505\uff0e\u5272\u3063\u3066\u304b\u3089\u4ee3\u5165\u3059\u308b\/\/=(\u6574\u6570\u306b\u306a\u308b\uff09<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c6\r\n\r\na = 100\r\nb = 30\r\n\r\na \/\/= b\r\nprint(a)<\/pre>\n<p>\u5272\u308a\u7b97\u3092\u3057\u3066\u5c0f\u6570\u3092\u51fa\u3057\u305f\u304f\u306a\u3044\u5834\u5408\u306b\u306f<br \/>\n\/\/=\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4f8b\u984c5\u3068\u306e\u9055\u3044\u306f\u4f8b\u984c5\u3067\u306f\/=\u3068\/\u304c\u4e00\u3064\u3067\u3057\u305f\u3002<br \/>\n\u4f8b\u984c6\u306f\/\/=\u3068\/\u304c2\u3064\u3064\u3044\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p>\/\/\u3068\/\u30922\u3064\u3064\u3051\u308b\u3053\u3068\u3067<br \/>\n\u5272\u308a\u5207\u308c\u306a\u3044\u7b54\u3048\u3067\u3082\u6574\u6570\u3067\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-549\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/dainyuuwareru807.jpg\" alt=\"\u4ee3\u5165\u6f14\u7b97\u5b50\u6574\u6570\u306e\u307f\" width=\"231\" height=\"159\" \/><\/p>\n<p class=\"check08\">\u4ee3\u5165\u6f14\u7b97\u5b506\uff0e\u4f59\u308a\u306e\u307f\u3092\u4ee3\u5165\u3059\u308b%=<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c7\r\n\r\na = 100\r\nb = 30\r\n\r\na %= b\r\nprint(a)<\/pre>\n<p>100\u00f730\uff1d3\u3042\u307e\u308a10\u3067\u3059\u306d\u3002<\/p>\n<p>\u306a\u306e\u3067%=\u3092\u4f7f\u3046\u3068<br \/>\n\u4f59\u308a\u306e10\u3092a\u306b\u4ee3\u5165\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3057\u305f\u304c\u3063\u3066\u4f8b\u984c7\u3092\u5b9f\u884c\u3059\u308b\u306810\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-550\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/amarigayouji807.jpg\" alt=\"\u4ee3\u5165\u6f14\u7b97\u5b50\" width=\"181\" height=\"164\" \/><\/p>\n<p class=\"check08\">\u4ee3\u5165\u6f14\u7b97\u5b506\uff0e\u3079\u304d\u4e57\u3092\u4ee3\u5165\u3059\u308b**=<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c7\r\n\r\na = 10\r\nb = 3\r\n\r\na **= b\r\nprint(a)<\/pre>\n<p>\u3079\u304d\u4e57\u3068\u306f\u300c\u4f55\u4e57\u300d\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002<br \/>\n\u8981\u3059\u308b\u306b\u4f8b\u984c7\u3067\u306f<br \/>\n10\u306e3\u4e57\u3092a\u306b\u4ee3\u5165\u3059\u308b\u3068\u3044\u3046\u610f\u5473\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067**=\u3068\u3059\u308b\u3053\u3068\u3067<br \/>\n10\u306e3\u4e57\uff1d1000\u3068\u8a08\u7b97\u3057\u3066a\u306b\u4ee3\u5165\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u5b9f\u884c\u3059\u308b\u3068<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-551\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/bejlokpi807.jpg\" alt=\"\u3079\u304d\u4e57\u8a08\u7b97\" width=\"232\" height=\"166\" \/><\/p>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0a\u304c\u4ee3\u5165\u6f14\u7b97\u5b50\u3067\u3059\u3002<\/p>\n<p>\u7d9a\u3044\u3066\u6bd4\u8f03\u6f14\u7b97\u5b50\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2><span id=\"Python-2\">\u3010Python\u5165\u9580\u3011\u6bd4\u8f03\u6f14\u7b97\u5b50\u307e\u3068\u3081<\/span><\/h2>\n<p>\u6bd4\u8f03\u6f14\u7b97\u5b50\u3068\u306f2\u3064\u306e\u5024\u3092\u6bd4\u8f03\u3057\u3066<br \/>\n\u5f97\u3089\u308c\u305f\u7d50\u679c\u306b\u5bfe\u3057\u3066\u771f\u304b\u507d\u304b\u8fd4\u3059\u3082\u306e\u3092\u3044\u3044\u307e\u3059\u3002<\/p>\n<p>\u771f\u306e\u5834\u5408\u306f\u300eTrue\u300f\u3001\u507d\u306e\u5834\u5408\u306f\u300eFalse\u300f\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u771f\u3068\u304b\u507d\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u77e5\u308a\u305f\u3044\u65b9\u306f<br \/>\n\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"linkcard\"><table border=\"1\" cellspacing=\"0\" cellpadding=\"4\"><tbody><\/tr><tr><td>\u3053\u3053\u307e\u3067\u306e\u8a18\u4e8b\u3067Python\u5165\u9580\u7de8\u3068\u3057\u3066\u5909\u6570\u306b\u3064\u3044\u3066\u305f\u304f\u3055\u3093\u89e3\u8aac\u3057\u3066\u304d\u307e\u3057\u305f\u3002\u307e\u3060\u898b\u3066\u306a\u3044\u65b9\u306f\u5148\u306b\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002\u21d2Python\u306e\u5909\u6570\u5ba3\u8a00\u3067\u6ce8\u610f\u3059\u3079\u304d\u3053\u3068\u21d2\u3010Python\u5165\u9580\u3011\u5909\u6570\u306e\u4ee3\u5165\u306b\u3064\u3044\u3066\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3068\u3053\u308d\u3067\u5909\u6570\u306b\u306f\u578b\u3068\u3044\u3046\u6982\u5ff5\u304c\u3042\u308a\u307e\u3059\u3002\u3067\u3001\u3042...<br><a class=\"no_icon\" href=\"https:\/\/python-introduction.com\/?p=447#Python4bool\">\u3010Python\u5165\u9580\u3011\u5909\u6570\u306e\u578b\u306b\u3064\u3044\u3066\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac<\/a> - python\u5165\u9580\u30c9\u30c3\u30c8\u30b3\u30e0<\/td><\/tr><\/tbody><\/table><\/div>\n<p class=\"check08\">\u6bd4\u8f03\u6f14\u7b97\u5b501.\u5927\u304d\u3044\u304b\u5c0f\u3055\u3044\u304b<\/p>\n<p>\u6bd4\u8f03\u6f14\u7b97\u5b50\u3068\u3057\u3066\u5927\u304d\u3044\u304b\u5c0f\u3055\u3044\u304b\u3092\u8868\u73fe\u3059\u308b\u3068\u304d\u306b\u306f<br \/>\n&gt;\u3068\u304b&lt;\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092=\u3092\u4f7f\u3063\u3066\u5909\u6570\u306b\u4ee3\u5165\u3057\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u4f8b\u984c\u3092\u3084\u3063\u3066\u307f\u305f\u307b\u3046\u304c\u308f\u304b\u308a\u3084\u3059\u3044\u3068\u601d\u3046\u306e\u3067<br \/>\n\u30c1\u30e3\u30ec\u30f3\u30b8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c8\r\n\r\na = 30; b = 28\r\nc = a &amp;lt; b\r\nprint(c)<\/pre>\n<p>\u307e\u305a\u3001\u6bd4\u8f03\u6f14\u7b97\u5b50\u3068\u3057\u3066\u3088\u304f\u4f7f\u308f\u308c\u308b\u306e\u304c<br \/>\n\u5927\u304d\u3044\u304b\u3001\u5c0f\u3055\u3044\u304b\u3067\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">c = a &amp;lt; b<\/pre>\n<p>\u3068\u3044\u3046\u306e\u306f<br \/>\na\u304c30\u3067b\u304c28\u3002<\/p>\n<p><span class=\"yellowbg\">\u5b9f\u969b\u306f30&gt;28\u306a\u306e\u3067\u3001a\u306e\u65b9\u304c\u5927\u304d\u3044\u308f\u3051\u3067\u3059\u3002<\/span><\/p>\n<p>\u3060\u304b\u308930&gt;28\u3067\u3059\u304b\u3089\u3001a&gt;b\u3060\u3063\u305f\u3089True\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u3082\u3001<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">c = a &amp;lt; b<\/pre>\n<p>\u3068\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u9593\u9055\u3044\uff08False)\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306eFalse\u3068\u3044\u3046\u7d50\u679c\u304cc\u306b\u4ee3\u5165\u3055\u308c\u308b\u306e\u3067<br \/>\n\u5b9f\u884c\u3059\u308b\u3068\u3001Falase\u3068\u8868\u793a\u3055\u308c\u308b\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-554\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/hikakufa809.jpg\" alt=\"\u6bd4\u8f03\u6f14\u7b97\u5b50\" width=\"419\" height=\"128\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/hikakufa809.jpg 419w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/hikakufa809-300x92.jpg 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/p>\n<p class=\"check08\">\u6bd4\u8f03\u6f14\u7b97\u5b502\uff0e\u4ee5\u4e0a\u3001\u4ee5\u4e0b<\/p>\n<p>\u4ee5\u4e0a\u3068\u3044\u3046\u306e\u306f\u305d\u306e\u6570\u5b57\u3092\u3068\u540c\u3058\u304b\u3001<br \/>\n\u305d\u306e\u6570\u5b57\u3088\u308a\u5927\u304d\u3044\u5834\u5408\u3092\u6307\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u300129\u3068\u3044\u3046\u6570\u5b57\u304c\u3042\u3063\u305f\u6642\u306b<br \/>\n29\u4ee5\u4e0a\u3068\u3044\u3046\u306a\u3089\u300129,30,31,32,\u30fb\u30fb\u30fb10000,100001<br \/>\n\u306829\u3092\u542b\u3093\u3060\u6570\u304cTrue\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306b\u5bfe\u3057\u3066\u4ee5\u4e0b\u3068\u3044\u3046\u306e\u306f<br \/>\n\u305d\u306e\u6570\u5b57\u3068\u540c\u3058\u304b\u3001\u305d\u306e\u6570\u5b57\u3088\u308a\u5c0f\u3055\u3044\u5834\u5408\u3092\u6307\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u307050\u3068\u3044\u3046\u6570\u5b57\u304c\u3042\u3063\u305f\u3089<br \/>\n50,49,48,47,\u30fb\u30fb\u30fb10,9,<br \/>\n\u306850\u3092\u542b\u3080\u6570\u5b57\u304c\u5f53\u3066\u306f\u307e\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u3001\u4ee5\u4e0a\u3001\u4ee5\u4e0b\u3092Python\u3067\u8868\u3059\u306a\u3089<br \/>\n&lt;=,&gt;=\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u4f8b\u984c8\u3092\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c8\r\n\r\na = 30; b = 28\r\nc = a &amp;gt;= b\r\nprint(c)<\/pre>\n<p>30\u306828\u3092\u6bd4\u3079\u305f\u308930\u306e\u65b9\u304c\u5927\u304d\u3044\u3067\u3059\u306d\u3002<br \/>\n\u3067\u300130\u3000&gt;= 28\u306f\u6b63\u3057\u3044\u306e\u3067True\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c9\r\n\r\na = 30; b = 30\r\nc = a &amp;gt;= b\r\nprint(c)<\/pre>\n<p>\u3067\u306f\u4f8b\u984c9\u306f\u3069\u3046\u3067\u3057\u3087\u3046\uff1f<br \/>\n\u3053\u308c\u3082True\u3067\u3059\u306d\u3002<\/p>\n<p>30\u3000&gt;= 30<br \/>\n\u306a\u308930\u4ee5\u4e0a\u3068\u3044\u3046\u3053\u3068\u306730\u3092\u542b\u3080\u306e\u3067True\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-556\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/hutougoudaishjou808.jpg\" alt=\"\u6bd4\u8f03\u6f14\u7b97\u5b50\" width=\"419\" height=\"128\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/hutougoudaishjou808.jpg 419w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/hutougoudaishjou808-300x92.jpg 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/p>\n<p class=\"check08\">\u6bd4\u8f03\u6f14\u7b97\u5b503.\u7b49\u3057\u3044\u304b\u7b49\u3057\u304f\u306a\u3044\u304b<\/p>\n<p>a\u3068b\u304c\u7b49\u3057\u3044\u5834\u5408\u306f\u300e==\u300f\u3001<br \/>\na\u3068b\u304c\u7b49\u3057\u304f\u306a\u3044\u5834\u5408\u306f\u300e!=\u300f\u3067\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u984c\u3092\u898b\u305f\u307b\u3046\u304c\u65e9\u3044\u306e\u3067<br \/>\n\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c10 \r\n\r\na = 30; b = 30\r\nc = a == b\r\nprint(c)<\/pre>\n<p>a\u304c30\u3001b\u304c30\u3067\u7b49\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">c = a == b<\/pre>\n<p>a == b<br \/>\n\u3068a\u3068b\u304c\u7b49\u3057\u3044\u3068\u306a\u3063\u3066\u3044\u3066<br \/>\n\u5408\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u5b9f\u884c\u3059\u308b\u3068True\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-560\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/true7809.jpg\" alt=\"True\" width=\"419\" height=\"128\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/true7809.jpg 419w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/true7809-300x92.jpg 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c11\r\n\r\na = 30; b = 31\r\nc = a != b\r\nprint(c)<\/pre>\n<p>\u4f8b\u984c11\u306f\u982d\u304c\u6df7\u4e71\u3059\u308b\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>a\u304c30\u3067b\u304c31\u306a\u306e\u3067\u7b49\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u3057\u3066<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">c = a != b<\/pre>\n<p>a\u3068b\u306f\u7b49\u3057\u304f\u306a\u3044\u3068<br \/>\nc\u306b\u4ee3\u5165\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u5b9f\u969b\u306ba\u3068b\u306f\u7b49\u3057\u304f\u306a\u3044\u308f\u3051\u306a\u306e\u3067<br \/>\n\u5b9f\u884c\u3059\u308b\u3068True\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-561\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/trueeesan808.jpg\" alt=\"\u6bd4\u8f03\u6f14\u7b97\u5b50\" width=\"419\" height=\"128\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/trueeesan808.jpg 419w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/trueeesan808-300x92.jpg 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c12\r\n\r\na = 30; b = 30\r\nc = a != b\r\nprint(c)<\/pre>\n<p>\u4f8b\u984c12\u306f<\/p>\n<p>a\u304c30\u3067b\u308230\u306a\u306e\u3067\u7b49\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>\u3067\u3082\u3001<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">c = a != b<\/pre>\n<p>\u6bd4\u8f03\u6f14\u7b97\u5b50\u3067\u306fa\u3068b\u306f\u7b49\u3057\u304f\u306a\u3044\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u306a\u306e\u3067\u5b9f\u969b\u3068\u6bd4\u8f03\u6f14\u7b97\u5b50\u304c\u5408\u3063\u3066\u306a\u3044\u306e\u3067<br \/>\n\u5b9f\u884c\u3059\u308b\u3068False\u304c\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-562\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/falsesann808.jpg\" alt=\"False\" width=\"419\" height=\"128\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/falsesann808.jpg 419w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/falsesann808-300x92.jpg 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/p>\n<p>\u4ee5\u4e0a\u3067\u6bd4\u8f03\u6f14\u7b97\u5b50\u307e\u3068\u3081\u306f\u7d42\u308f\u308a\u3067\u3059\u3002<\/p>\n<p>\u6b21\u306b\u8ad6\u7406\u6f14\u7b97\u5b50\u3092\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2><span id=\"Python-3\">\u3010Python\u5165\u9580\u3011\u8ad6\u7406\u6f14\u7b97\u5b50\u307e\u3068\u3081<\/span><\/h2>\n<p>\u8ad6\u7406\u6f14\u7b97\u5b50\u3068\u306f\u3069\u3093\u306a\u6f14\u7b97\u5b50\u306a\u306e\u3067\u3057\u3087\u3046\uff1f<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001\u300e20\u3088\u308a\u5927\u304d\u304f\u3001\u304b\u3064\u300135\u3088\u308a\u5c0f\u3055\u3044\u300f\u3068\u304b<br \/>\n\u300ea\u304c20\u3068\u7b49\u3057\u3044\u3001\u53c8\u306fb\u304c30\u3068\u7b49\u3057\u3044\u300f\u3068\u8a00\u3063\u305f\u611f\u3058\u3067<br \/>\n2\u3064\u306e\u6761\u4ef6\u3092\u304f\u3063\u3064\u3051\u308b\u6f14\u7b97\u5b50\u306e\u3053\u3068\u3092\u8ad6\u7406\u6f14\u7b97\u5b50\u3068\u3044\u3044\u307e\u3059\u3002<\/p>\n<div class=\"boxstyle01\">\n<p class=\"check08\"><span style=\"color: #ff0000;\">Python\u3067\u4f7f\u3046\u8ad6\u7406\u6f14\u7b97\u5b50\u306b\u306f<\/span><\/p>\n<p>\u30fband<br \/>\n\u30fbor<br \/>\n\u30fbnot<\/p>\n<\/div>\n<div>\u306e3\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<p class=\"check08\">\u8ad6\u7406\u6f14\u7b97\u5b501\uff0eand<\/p>\n<p>\u307e\u305aand\u304b\u3089\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">a and b<\/pre>\n<p>\u3063\u3066\u3042\u3063\u305f\u3068\u304d\u306b\u3001<br \/>\na\u3068b\u304c\u4e21\u65b9\u3068\u3082\u771f\uff08True)\u3060\u3063\u305f\u3089<br \/>\n\u7d50\u679c\u3082True\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u3082a\u306f\u771f\u3067\u3082b\u304c\u507d\u306a\u3089\u7d50\u679c\u306fFalse\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u307e\u305fa\u306f\u507d\u3067\u3001b\u304c\u771f\u3067\u3082\u7d50\u679c\u306fFalse\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3082\u3061\u308d\u3093a\u304c\u507d\u3067b\u304c\u507d\u3067\u3082False\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u4f8b\u984c13\u3092\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c13(and\u306f\u4e21\u8005\u3068\u3082\u6e80\u305f\u3059\u3068True\u306b\u306a\u308a\u307e\u3059)\r\n\r\na = 19.8\r\nb = 20.8\r\nc = a &gt; 20 and b &gt;20\r\nprint(c)<\/pre>\n<p>\u4f8b\u984c13\u3067\u306fa\u304c\u507d\u3067\u3059\u3002<br \/>\n19.8\u306f20\u3088\u308a\u5c0f\u3055\u3044\u306e\u306b<br \/>\na(19.8) &gt; 20<br \/>\n\u3068\u306a\u3063\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>b\u306f\u771f\u3067\u3059\u3002<\/p>\n<p>\u3067\u3082a\u304c\u507d\u3067\u3042\u308b\u4ee5\u4e0a<br \/>\n\u5b9f\u884c\u3059\u308b\u3068False\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-567\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronriand809.jpg\" alt=\"\u8ad6\u7406\u6f14\u7b97\u5b50and\" width=\"419\" height=\"145\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronriand809.jpg 419w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronriand809-300x104.jpg 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/p>\n<p>\u3067\u306f\u4f8b\u984c14\u306fTrue\u3067\u3057\u3087\u3046\u304b<br \/>\n\u305d\u308c\u3068\u3082False\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c14(and\u306f\u4e21\u8005\u3068\u3082\u6e80\u305f\u3059\u3068True\u306b\u306a\u308a\u307e\u3059)\r\n\r\na = 19.8\r\nb = 20.8\r\nc = a &lt; 20 and b &gt;20\r\nprint(c)<\/pre>\n<p>a(19.8) &lt; 20 \u3067\u771f\u3067\u3059\u306d\u3002 b(20.8) &gt; 20<br \/>\n\u3067\u771f\u3067\u3059\u306d\u3002<\/p>\n<p>and\u3092\u4f7f\u3063\u3066\u3044\u308b\u308f\u3051\u3067\u3059\u304c<br \/>\na,b\u4e21\u8005\u3068\u3082\u771f\u306a\u306e\u3067\u5b9f\u884c\u3059\u308b\u3068True\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-569\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronriandtrue810.jpg\" alt=\"\u8ad6\u7406\u6f14\u7b97\u5b50and\" width=\"419\" height=\"145\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronriandtrue810.jpg 419w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronriandtrue810-300x104.jpg 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/p>\n<p class=\"check08\">\u8ad6\u7406\u6f14\u7b97\u5b502\uff0eor<\/p>\n<p>\u6b21\u3001or\u3092\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001<br \/>\na or b\u306e\u5834\u5408\u3001<br \/>\na\u304bb\u3069\u3061\u3089\u304b1\u3064\u3067\u3082\u771f\u306a\u3089<br \/>\n\u7d50\u679c\u306fTrue\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070<br \/>\na\u304c\u771f\u3001b\u304c\u507d\u306a\u3089<br \/>\nand\u306e\u5834\u5408\u306b\u306fFalse\u3067\u3059\u304c<br \/>\nor\u3060\u3063\u305f\u3089True\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>a\u304c\u507d\u3001b\u304c\u771f\u3067\u3082or\u306a\u3089True\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>a\u304c\u507d\u3001b\u304c\u507d\u306e\u5834\u5408\u3060\u3051<br \/>\n\u7d50\u679c\u306fFalse\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3046\u3044\u3063\u305f\u610f\u5473\u3067\u306for\u306fand\u3088\u308a\u3082<br \/>\nTrue\u306b\u306a\u308a\u6761\u4ef6\u304c\u7de9\u3044\u8ad6\u7406\u6f14\u7b97\u5f0f\u306b\u306a\u308a\u307e\u3059\u306d\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c15(or\u306f\u3069\u3061\u3089\u304b\u4e00\u3064\u3067\u3082\u771f\u306a\u3089True\u306b\u306a\u308a\u307e\u3059)\r\n\r\na = 19.8\r\nb = 20.8\r\nc = a &gt; 20 or b &gt;20\r\nprint(c)<\/pre>\n<p>\u4f8b\u984c15\u306fa\u306f\u507d\u3067\u3059\u3002<br \/>\nb\u306f\u771f\u3067\u3059\u3002<\/p>\n<p>a\u304c\u507d\u3067\u3082b\u304c\u771f\u306a\u306e\u3067or\u306a\u3089True\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-570\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronrienzaior809.jpg\" alt=\"\u8ad6\u7406\u6f14\u7b97\u5b50or\" width=\"419\" height=\"145\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronrienzaior809.jpg 419w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronrienzaior809-300x104.jpg 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c16(or\u306f\u3069\u3061\u3089\u304b\u4e00\u3064\u3067\u3082\u771f\u306a\u3089True\u306b\u306a\u308a\u307e\u3059)\r\n\r\na = 19.8\r\nb = 20.8\r\nc = a &gt; 20 or b &lt;20\r\nprint(c)<\/pre>\n<p>\u4f8b\u984c16\u306fa\u3082b\u3082\u507d\u3067\u3059\u3002<\/p>\n<p>a(19.8) \u306f20\u3088\u308a\u5c0f\u3055\u3044\u306e\u3067\u507d<br \/>\nb(20.8)\u304c20\u3088\u308a\u5927\u304d\u3044\u306e\u3067\u507d\u3067\u3059\u3002<\/p>\n<p>a,b\u4e21\u8005\u3068\u3082\u507d\u306a\u306e\u3067\u3055\u3059\u304c\u306eor\u3067\u3082<br \/>\n\u5b9f\u884c\u3059\u308b\u3068False\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-572\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronrienzanor8010.jpg\" alt=\"\u8ad6\u7406\u6f14\u7b97\u5b50or\" width=\"419\" height=\"145\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronrienzanor8010.jpg 419w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronrienzanor8010-300x104.jpg 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/p>\n<p class=\"check08\">\u8ad6\u7406\u6f14\u7b97\u5b503.not<\/p>\n<p>not\u306f\u5426\u5b9a\u3092\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070not a<br \/>\n\u3068\u306a\u3063\u3066\u3044\u305f\u3089\u3001<br \/>\na\u304c\u771f\u306a\u3089False\u3068\u306a\u308a<br \/>\na\u304c\u507d\u306a\u3089True\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u500b\u4eba\u7684\u306a\u899a\u3048\u65b9\u3067\u3059\u304c\u3001<br \/>\nnot\u306f\u5929\u306e\u90aa\u9b3c\uff08\u3042\u307e\u306e\u3058\u3083\u304f\uff09\u6f14\u7b97\u5b50\u3068\u899a\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c17(not\u306fa\u304c\u771f\u306a\u3089False\u3001\u507d\u306a\u3089True)\r\n\r\na = 19.8\r\n\r\nc = not a == 20\r\nprint(c)<\/pre>\n<p>\u4f8b\u984c17\u306fa\u304c19.8\u306a\u306e\u306b\u3001<br \/>\na == 20(a\u306f20\u3068\u7b49\u3057\u3044\uff09\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u306a\u306e\u3067\u3001a\u306f\u507d\u3067\u3059\u3002<\/p>\n<p>\u3067\u3082\u3001not\u304c\u3064\u3044\u3066\u3044\u308b\u306e\u3067<br \/>\n\u5b9f\u884c\u3059\u308b\u3068True\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3084\u3084\u3053\u3057\u3044\u3067\u3059\u306d\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-573\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronrenzannnot801.jpg\" alt=\"\u8ad6\u7406\u6f14\u7b97\u5b50not\" width=\"419\" height=\"145\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronrenzannnot801.jpg 419w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/ronrenzannnot801-300x104.jpg 300w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c18(not\u306fa\u304c\u771f\u306a\u3089False\u3001\u507d\u306a\u3089True)\r\n\r\na = 19.8\r\n\r\nc = not a == 19.8\r\nprint(c)<\/pre>\n<p>\u4f8b\u984c18\u306fa\u304c19.8\u3067<br \/>\na == 19.8\u3068\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u771f\u3067\u3059\u3002<\/p>\n<p>not\u306e\u5834\u5408\u306b\u306f\u771f\u306fFalse\u306a\u306e\u3067<br \/>\n\u5b9f\u884c\u3059\u308b\u3068False\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-575\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/faksenot810.jpg\" alt=\"\u8ad6\u7406\u6f14\u7b97\u5b50not\" width=\"321\" height=\"146\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/faksenot810.jpg 321w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/faksenot810-300x136.jpg 300w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/faksenot810-320x146.jpg 320w\" sizes=\"(max-width: 321px) 100vw, 321px\" \/><\/p>\n<p>\u6b21\u306b\u4e09\u9805\u6f14\u7b97\u5b50\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2><span id=\"Python-4\">\u3010Python\u5165\u9580\u3011\u4e09\u9805\u6f14\u7b97\u5b50\u307e\u3068\u3081<\/span><\/h2>\n<p>\u4e09\u9805\u6f14\u7b97\u5b50\u3068\u306f3\u3064\u306e\u9805\u76ee\u3092\u4f7f\u3063\u3066\u51e6\u7406\u3059\u308b\u6f14\u7b97\u5b50\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u4f8b\u984c\u3092\u3084\u3063\u3066\u307f\u305f\u65b9\u304c\u7406\u89e3\u304c\u65e9\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u306a\u306e\u3067\u3001\u3055\u3063\u305d\u304f\u4f8b\u984c\u3092\u3084\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-577\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/kaitenzusi810.jpg\" alt=\"\u56de\u8ee2\u5bff\u53f8\" width=\"620\" height=\"414\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/kaitenzusi810.jpg 620w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/kaitenzusi810-300x200.jpg 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c19(\u4e09\u9805\u6f14\u7b97\u5b50)\r\n\r\nokane =200\r\n\r\nsushi = &quot;kappamaki&quot; if okane &lt; 300 else &quot;toro&quot;\r\nprint(sushi)<\/pre>\n<p>\u3053\u306e\u90e8\u5206\u304c\u4e09\u9805\u6f14\u7b97\u5b50\u306e\u809d\u306e\u90e8\u5206\u3067\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">sushi = &quot;kappamaki&quot; if okane &lt; 300 else &quot;toro&quot;<\/pre>\n<p>\u56de\u8ee2\u5bff\u53f8\u3092\u60f3\u50cf\u3057\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>okane\uff08\u304a\u91d1\uff09\u3092200\uff08\u5186\uff09\u6301\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u305d\u3057\u3066\u3082\u3057\u304a\u91d1\u304c300\u672a\u6e80\u306a\u3089kappamaki\uff08\u304b\u3063\u3071\u5dfb\u304d\uff09\u3092<br \/>\n\u305d\u3046\u3067\u306a\u3044\uff08300\u5186\u4ee5\u4e0a\uff09\u306a\u3089toro\uff08\u30c8\u30ed\uff09\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u304a\u91d1\u3092200\uff08\u5186\uff09\u3057\u304b\u6301\u3063\u3066\u306a\u3044\u306e\u3067<br \/>\n\u5b9f\u884c\u3059\u308b\u3068kappamaki\uff08\u304b\u3063\u3071\u5dfb\u304d\uff09\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-578\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/kappamaki810.jpg\" alt=\"\u4e09\u9805\u6f14\u7b97\u5b50\" width=\"367\" height=\"140\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/kappamaki810.jpg 367w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/kappamaki810-300x114.jpg 300w\" sizes=\"(max-width: 367px) 100vw, 367px\" \/><\/p>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u4f7f\u3046<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">sushi = &quot;kappamaki&quot; if okane &lt; 300 else &quot;toro&quot;<\/pre>\n<p>\u6f14\u7b97\u5b50\u3092\u4e09\u9805\u6f14\u7b97\u5b50\u3068\u3044\u3044\u307e\u3059\u3002<\/p>\n<p>\u5225\u306e\u8a00\u3044\u65b9\u3092\u3059\u308b\u3068<br \/>\n<span class=\"marker_kpink\">\u6761\u4ef6\u306e\u5224\u5b9a\u7d50\u679c\u306b\u3088\u3063\u3066\u5024\uff08toro,kappamaki)\u3092<br \/>\n\u9078\u629e\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3082\u306e\u3092\u4e09\u9805\u6f14\u7b97<\/span>\u5b50\u3068\u3044\u3044\u307e\u3059\u3002<\/p>\n<h2><span id=\"Python-5\">Python\u3067\u4f7f\u3046\u6f14\u7b97\u5b50\u307e\u3068\u3081<\/span><\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-448\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/pckawaiijosei806.jpg\" alt=\"\u6f14\u7b97\u5b50\u307e\u3068\u3081\" width=\"620\" height=\"406\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/pckawaiijosei806.jpg 620w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/pckawaiijosei806-300x196.jpg 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/p>\n<div class=\"boxstyle01\">\n<p class=\"check08\"><span style=\"color: #ff0000;\">Python\u3067\u4f7f\u3046\u6f14\u7b97\u5b50\u306b\u306f<\/span><\/p>\n<p>\u30fb\u4ee3\u5165\u6f14\u7b97\u5b50<br \/>\n\u30fb\u6bd4\u8f03\u6f14\u7b97\u5b50<br \/>\n\u30fb\u8ad6\u7406\u6f14\u7b97\u5b50<br \/>\n\u30fb\u4e09\u9805\u6f14\u7b97\u5b50<\/p><\/div>\n<p>\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u300c\u8907\u96d1\u3067\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u3088\u300d<br \/>\n\u3068\u3044\u3046\u65b9\u3001\u3082\u3046\u4e00\u5ea6\u3001\u5fa9\u7fd2\u3057\u3066\u3044\u305f\u3060\u3051\u308b\u3068<br \/>\n\u5c11\u3057\u305a\u3064\u308f\u304b\u3063\u3066\u304f\u308b\u3068\u601d\u3044\u307e\u3059\u3088\u3002<\/p>\n<p>\u4ee5\u4e0a\u3067\u6f14\u7b97\u5b50\u306e\u307e\u3068\u3081\u3092\u7d42\u308f\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u3053\u306e\u8a18\u4e8b\u3067\u306fPython\u3067\u4f7f\u3046 \u30fb\u4ee3\u5165\u6f14\u7b97\u5b50 \u30fb\u6bd4\u8f03\u6f14\u7b97\u5b50 \u30fb\u8ad6\u7406\u6f14\u7b97\u5b50 \u30fb\u4e09\u9805\u6f14\u7b97\u5b50 \u306b\u3064\u3044\u3066\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002 \u4e00\u822c\u7684\u306a\u8a08\u7b97\u306b\u3064\u3044\u3066\u306f \u3053\u3061\u3089\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u306e\u3067 \u3054\u89a7\u304f\u3060\u3055\u3044\u3002 \u76ee\u6b211 \u3010Python\u5165 [&hellip;]","protected":false},"author":1,"featured_media":539,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,19],"tags":[3,41],"_links":{"self":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/536"}],"collection":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=536"}],"version-history":[{"count":21,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/536\/revisions"}],"predecessor-version":[{"id":580,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/536\/revisions\/580"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/media\/539"}],"wp:attachment":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}