{"id":6838,"date":"2016-12-07T10:30:53","date_gmt":"2016-12-07T01:30:53","guid":{"rendered":"http:\/\/sitest.jp\/blog\/?p=6838"},"modified":"2017-01-31T18:26:07","modified_gmt":"2017-01-31T09:26:07","slug":"python%e3%81%af%e3%81%98%e3%82%81%e3%81%be%e3%81%97%e3%81%9f-%e2%80%90-%e4%ba%ba%e5%b7%a5%e7%9f%a5%e8%83%bd%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0%e6%9c%80%e5%88%9d%e3%81%ae","status":"publish","type":"post","link":"https:\/\/sitest.jp\/blog\/?p=6838","title":{"rendered":"Python\u306f\u3058\u3081\u307e\u3057\u305f \u2010 \u4eba\u5de5\u77e5\u80fd\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u6700\u521d\u306e\u4e00\u6b69"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u30d7\u30ed\u30c0\u30af\u30c8\u958b\u767a\u30c1\u30fc\u30e0 \u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u68ee\u6c38\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u524d\u306e\u8a18\u4e8b\u300c<a href=\"http:\/\/sitest.jp\/blog\/?p=5336\" target=\"_blank\">\u4eba\u5de5\u77e5\u80fd\u306e\u958b\u767a\u3068\u76f8\u6027\u306e\u826f\u3044\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e3\u9078<\/a>\u300d\u3067\u7d39\u4ecb\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u3046\u3061\u3001\u3084\u306f\u308aPython\u306e\u4eba\u6c17\u306f\u9ad8\u3044\u3067\u3059\u3002\u4eba\u5de5\u77e5\u80fd\u95a2\u9023\u306e\u8a00\u8a9e\u3067\u306f\u4e00\u756a\u4eba\u6c17\u304c\u9ad8\u3044\u3068\u8a00\u3063\u3066\u3082\u904e\u8a00\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u3057\u304b\u3057\u306a\u304c\u3089\u3001\u3053\u306e\u30d6\u30ed\u30b0\u3092\u8aad\u307e\u308c\u3066\u3044\u308b\u65b9\u306e\u4e2d\u306b\u306f\u300c\u8a71\u306f\u805e\u304f\u3051\u3069Python\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d44\u3093\u3060\u3053\u3068\u306f\u306a\u3044\u300d\u3068\u3044\u3046\u65b9\u3082\u591a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u5b9f\u306f\u79c1\u3082\u30d6\u30ed\u30b0\u306e\u8a18\u4e8b\u3067\u306f\u3044\u308d\u3044\u308d\u66f8\u3044\u3066\u304a\u308a\u307e\u3059\u304c\u3001\u5b9f\u969b\u306bPython\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d44\u3093\u3060\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u203bLISP\u3068<a href=\"http:\/\/sitest.jp\/blog\/?p=5906\" target=\"_blank\">Prolog<\/a>\u306f\u5927\u5b66\u6642\u4ee3\u306b\u4f7f\u7528\u3057\u3066\u304a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u4eca\u56de\u306f\u300c\u4eba\u5de5\u77e5\u80fd\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u6700\u521d\u306e\u4e00\u6b69\u300d\u3068\u3057\u3066\u3001\u5b9f\u969b\u306bPython\u3092\u5c0e\u5165\u3057\u3066\u7c21\u5358\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d44\u3093\u3067\u307f\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\u5c0e\u5165\u306e\u524d\u306bPython\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3064\u3044\u3066<\/h3>\n<\/div>\n<p>Python\u306f\u73fe\u5728\u30d0\u30fc\u30b8\u30e7\u30f32\u7cfb\u30683\u7cfb\u304c\u3042\u308a\u3001\u3057\u304b\u3082\u4e00\u90e8\u4e92\u63db\u6027\u306e\u306a\u3044\u3068\u3053\u308d\u3082\u3042\u308b\u305f\u3081\u3069\u3061\u3089\u3092\u4f7f\u3046\u304b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u610f\u898b\u304c\u5206\u304b\u308c\u308b\u70b9\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u793e\u5185\u30672\u7cfb\u306e\u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u3063\u3066\u3044\u308b\u3001\u3042\u308b\u3044\u306f2\u7cfb\u3067\u3057\u304b\u51fa\u56de\u3063\u3066\u3044\u306a\u3044\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046\u3068\u3044\u3063\u305f\u7406\u7531\u304c\u3042\u308b\u5834\u5408\u306f2\u7cfb\u3001\u4eca\u5f8c\u306e\u5c06\u6765\u6027\u3092\u8003\u3048\u308b\u306e\u3067\u3042\u308c\u30703\u7cfb\u3092\u4f7f\u3046\u306e\u304c\u59a5\u5f53\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>Mac\u306e\u5834\u5408\u306f2\u7cfb\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u4eca\u56de\u306f3\u7cfb\u3092\u5c0e\u5165\u3059\u308b\u3068\u3053\u308d\u304b\u3089\u59cb\u3081\u307e\u3059\u3002<\/p>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\u3067\u306fPython\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/h3>\n<\/div>\n<p>\u203bMac\u306e\u5834\u5408\u3067\u8aac\u660e\u3057\u307e\u3059\u304c\u3001Windows\u3082\u540c\u69d8\u306e\u624b\u9806\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001<a href=\"https:\/\/www.python.org\/downloads\/\" target=\"_blank\" rel=\"nofollow\">Python\u306e\u516c\u5f0f\u30b5\u30a4\u30c8<\/a>\u304b\u3089\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u30fc\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" src=\"https:\/\/storage.googleapis.com\/sitest-wp\/blog\/wp-content\/uploads\/2016\/12\/python_download.png\" alt=\"Python\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30b5\u30a4\u30c8\" width=\"720\" height=\"450\" class=\"alignnone size-full wp-image-6871\" \/><br \/>\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u30fc\u3092\u8d77\u52d5\u3057\u3066\u3001\u5f8c\u306f\u6307\u793a\u306b\u5f93\u3044\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" src=\"https:\/\/storage.googleapis.com\/sitest-wp\/blog\/wp-content\/uploads\/2016\/12\/python_install_1.png\" alt=\"Python\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u958b\u59cb\" width=\"600\" height=\"451\" class=\"alignnone size-full wp-image-6873\" \/><br \/>\n<img loading=\"lazy\" src=\"https:\/\/storage.googleapis.com\/sitest-wp\/blog\/wp-content\/uploads\/2016\/12\/python_install_2.png\" alt=\"Python\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7d42\u4e86\" width=\"600\" height=\"451\" class=\"alignnone size-full wp-image-6874\" \/><\/p>\n<p>\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>Mac\u306e\u5834\u5408\u306f\u65e2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b2\u7cfb\u306f\u300cpython\u300d\u30b3\u30de\u30f3\u30c9\u30013\u7cfb\u306f\u300cpython3\u300d\u30b3\u30de\u30f3\u30c9\u3067Python\u3092\u8d77\u52d5\u3067\u304d\u307e\u3059\u3002<br \/>\n\u203b\u300cpython\u300d\u30b3\u30de\u30f3\u30c9\u30673\u7cfb\u3092\u8d77\u52d5\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u30c4\u30fc\u30eb\u3082\u3042\u308a\u307e\u3059\u304c\u4eca\u56de\u306f\u5272\u611b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\u7c21\u5358\u306a\u30d7\u30ed\u30b0\u30e9\u30e0<\/h3>\n<\/div>\n<pre><code>> python3\n\n>>> print('Hello world!')\nHello world!\n<\/code><\/pre>\n<p>Python\u306f\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u8a00\u8a9e\u306a\u306e\u3067\u308f\u3056\u308f\u3056\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u306a\u304f\u3068\u3082\u300cHello world!\u300d\u304c\u7c21\u5358\u306b\u51fa\u305b\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\u300c<a href=\"http:\/\/sitest.jp\/blog\/?p=5906\" target=\"_blank\">Prolog\u3068\u8ad6\u7406\u5b66\u3068\u4eba\u5de5\u77e5\u80fd\u3068<\/a>\u300d\u3067\u66f8\u3044\u305f\u732b\u306e\u540d\u524d\u3092\u8abf\u3079\u308b\u30b5\u30f3\u30d7\u30eb\u3092\u3001Python\u306e<a href=\"http:\/\/www.pythonweb.jp\/tutorial\/dictionary\/\" target=\"_blank\" rel=\"nofollow\">\u8f9e\u66f8\u6a5f\u80fd<\/a>\u3092\u4f7f\u3063\u3066\u66f8\u3044\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre><code>>>> name = {'cat' : ['tama', 'mike'] , 'dog' : ['taro', 'pochi']}\n>>> for x in name['cat']:\n. . .     print(x)\n. . .\ntama\nmike\n<\/code><\/pre>\n<p>\u3053\u3053\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u306a\u306e\u306f\u3001C\u3084Java\u306a\u3069\u306e\u8a00\u8a9e\u3067\u306ffor\u6587\u306a\u3069\u306f{}\u3067\u56f2\u307f\u307e\u3059\u304c\u3001Python\u3067\u306f\u30a4\u30f3\u30c7\u30f3\u30c8\u306b\u3088\u308b\u30d6\u30ed\u30c3\u30af\u3092\u7528\u3044\u3066\u8868\u73fe\u3057\u307e\u3059\u3002<br \/>\n\u6975\u529b\u8a18\u8ff0\u91cf\u3092\u6e1b\u3089\u305b\u308b\u3068\u3044\u3046Python\u306e\u7279\u5fb4\u304c\u51fa\u3066\u3044\u308b\u70b9\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u306e\u305f\u3081\u4ed6\u306e\u8a00\u8a9e\u306e\u611f\u899a\u3067\u30ab\u30c3\u30b3\u3092\u4f7f\u3046\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3054\u6ce8\u610f\u4e0b\u3055\u3044\u3002<\/p>\n<p>\u307e\u305f\u3001\u5916\u90e8\u30d5\u30a1\u30a4\u30eb(\u62e1\u5f35\u5b50&#8221;.py&#8221;)\u306b\u8a18\u8f09\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u547c\u3073\u51fa\u3059\u3068\u304d\u306f\u3001\u300cpython3 (\u30d5\u30a1\u30a4\u30eb\u540d)\u300d\u3067\u8d77\u52d5\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre><code>> python3 sample.py\ntama\nmike\n> \n<\/code><\/pre>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\u6700\u5f8c\u306b<\/h3>\n<\/div>\n<p>Python\u306f\u5c0e\u5165\u3001\u305d\u3057\u3066\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u958b\u59cb\u307e\u3067\u306e\u6577\u5c45\u304c\u4f4e\u3044\u3053\u3068\u304c\u304a\u308f\u304b\u308a\u3044\u305f\u3060\u3051\u305f\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u6bb5\u968e\u3067\u306f\u4eba\u5de5\u77e5\u80fd\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306f\u307e\u3060\u307e\u3060\u5148\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u95a2\u9023\u66f8\u7c4d\u3084\u30e9\u30a4\u30d6\u30e9\u30ea\u3082\u5145\u5b9f\u3057\u3066\u3044\u308b\u306e\u3067\u307e\u305f\u6539\u3081\u3066\u7d39\u4ecb\u3057\u3066\u307e\u3044\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u30d7\u30ed\u30c0\u30af\u30c8\u958b\u767a\u30c1\u30fc\u30e0 \u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u68ee\u6c38\u3067\u3059\u3002 \u4ee5\u524d\u306e\u8a18\u4e8b\u300c\u4eba\u5de5\u77e5\u80fd\u306e\u958b\u767a\u3068\u76f8\u6027\u306e\u826f\u3044\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e3\u9078\u300d\u3067\u7d39\u4ecb\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u3046\u3061\u3001\u3084\u306f\u308aPython\u306e\u4eba\u6c17\u306f\u9ad8\u3044\u3067\u3059\u3002\u4eba\u5de5\u77e5\u80fd\u95a2\u9023\u306e\u8a00\u8a9e\u3067\u306f\u4e00\u756a\u4eba\u6c17\u304c\u9ad8\u3044\u3068\u8a00\u3063\u3066\u3082\u904e\u8a00\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u3002 \u3057\u304b\u3057\u306a\u304c\u3089\u3001\u3053\u306e\u30d6\u30ed\u30b0\u3092\u8aad\u307e\u308c\u3066\u3044\u308b\u65b9\u306e\u4e2d\u306b\u306f\u300c\u8a71\u306f\u805e\u304f\u3051\u3069Python\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d44\u3093\u3060\u3053\u3068\u306f\u306a\u3044\u300d\u3068\u3044\u3046\u65b9\u3082\u591a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u5b9f\u306f [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":5361,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[25,27],"tags":[],"acf":false,"_links":{"self":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/6838"}],"collection":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/comments?post=6838"}],"version-history":[{"count":14,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/6838\/revisions"}],"predecessor-version":[{"id":8076,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/6838\/revisions\/8076"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/media\/5361"}],"wp:attachment":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/media?parent=6838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/categories?post=6838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/tags?post=6838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}