{"id":897,"date":"2018-08-22T17:03:04","date_gmt":"2018-08-22T08:03:04","guid":{"rendered":"https:\/\/python-introduction.com\/?p=897"},"modified":"2018-08-22T17:03:04","modified_gmt":"2018-08-22T08:03:04","slug":"%e3%80%90python%e5%85%a5%e9%96%80%e3%80%91%e9%96%a2%e6%95%b0%e3%81%a7%e8%a4%87%e6%95%b0%e3%81%ae%e5%80%a4%e3%82%92%e6%88%bb%e3%82%8a%e5%80%a4%e3%81%a8%e3%81%97%e3%81%a6%e5%be%97%e3%82%8b%e3%81%ab","status":"publish","type":"post","link":"https:\/\/python-introduction.com\/?p=897","title":{"rendered":"\u3010Python\u5165\u9580\u3011\u95a2\u6570\u3067\u8907\u6570\u306e\u5024\u3092\u623b\u308a\u5024\u3068\u3057\u3066\u5f97\u308b\u306b\u306f\uff1f"},"content":{"rendered":"<p>\u524d\u56de\u306e\u8a18\u4e8b\u3067\u306f\u5f15\u6570\u3092\u4f7f\u3063\u3066<br \/>\n\u5916\u90e8\u306e\u5024\u3092\u5b9a\u7fa9\u3057\u305f\u95a2\u6570\u306b\u5f15\u304d\u6e21\u3059\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u8a73\u3057\u304f\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<br \/>\n\u21d2<a href=\"https:\/\/python-introduction.com\/?p=879\" target=\"blank\">\u3010Python\u3011\u95a2\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u65b9\u6cd5\u30fb\u547c\u3073\u51fa\u3057\u3084\u5f15\u6570\u306b\u3064\u3044\u3066\u3082\u89e3\u8aac<\/a><\/p>\n<p>\u4eca\u56de\u306f\u623b\u308a\u5024\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p>\u623b\u308a\u5024\u306f\u8fd4\u308a\u5024\u3068\u3082\u3044\u3044\u307e\u3059\u3002<br \/>\n\u5f15\u6570\u3068\u306f\u9006\u306e\u8003\u3048\u65b9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u623b\u308a\u5024\u306f\u95a2\u6570\u304b\u3089\u623b\u3063\u3066\u304f\u308b\u5024\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001\u95a2\u6570\u306b\u5165\u3063\u3066\u304f\u308b\u5024\u3092\u5f15\u6570\u3001<br \/>\n\u95a2\u6570\u304b\u3089\u51fa\u3066\u3044\u304f\u5024\u3092\u623b\u308a\u5024\u3068\u3044\u3046\u308f\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u623b\u308a\u5024\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u307f\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\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\u623b\u308a\u5024\u306e\u57fa\u672c<\/a><\/li><li><a href=\"#Python-2\"><span class=\"toc_number toc_depth_1\">2<\/span> \u3010Python\u5165\u9580\u3011\u5f15\u6570\u3068\u623b\u308a\u5024\u3092\u4e00\u7dd2\u306b\u4f7f\u3046\u66f8\u304d\u65b9<\/a><\/li><li><a href=\"#Python-3\"><span class=\"toc_number toc_depth_1\">3<\/span> \u3010Python\u5165\u9580\u3011\u8907\u6570\u306e\u5024\u3092\u623b\u308a\u5024\u3068\u3057\u3066\u5f97\u308b\u65b9\u6cd5<\/a><\/li><\/ul><\/div>\n<h2><span id=\"Python\">\u3010Python\u5165\u9580\u3011\u623b\u308a\u5024\u306e\u57fa\u672c<\/span><\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/pasokonmodoriti821.jpg\" alt=\"\u623b\u308a\u5024\" width=\"620\" height=\"472\" class=\"alignnone size-full wp-image-899\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/pasokonmodoriti821.jpg 620w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/pasokonmodoriti821-300x228.jpg 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/p>\n<p>\u95a2\u6570\u306e\u623b\u308a\u5024\u306b\u3064\u3044\u3066\u7406\u89e3\u3059\u308b\u305f\u3081\u306b<br \/>\n\u307e\u305a\u4f8b\u984c1\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c1\r\ndef daisuki():\r\n    x = '\u30c1\u30ef\u30ef\u304c\u5927\u597d\u304d'\r\n    return x\r\n    \r\ny = daisuki()\r\nprint(y)<\/pre>\n<p>\u305d\u308c\u3067\u306f\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">def daisuki():\r\n    x = '\u30c1\u30ef\u30ef\u304c\u5927\u597d\u304d'\r\n\u3000\u3000return x<\/pre>\n<p>\u3053\u3053\u3067\u3001def daisuki():<br \/>\n\u3068\u3059\u308b\u3053\u3068\u3067\u3001daisuki\u3068\u3044\u3046\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u307e\u3057\u305f\u3002<br \/>\ndef\u304c\u5b9a\u7fa9\u3059\u308b\u3068\u3044\u3046\u610f\u5473\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u304b\u3089\u3001<br \/>\nx = &#8216;\u30c1\u30ef\u30ef\u304c\u5927\u597d\u304d&#8217;\u3068<br \/>\n\u5909\u6570x\u306b\u300e\u30c1\u30ef\u30ef\u304c\u5927\u597d\u304d\u300f\u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u4ee3\u5165\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u3042\u3068\u3001<br \/>\nreturn x<br \/>\n\u3068\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u3053\u304c\u623b\u308a\u5024\u3068\u3057\u3066\u91cd\u8981\u3067\u3059\u3002<\/p>\n<p>daisuki\u3068\u3044\u3046\u95a2\u6570\u306e\u5185\u90e8\u3067return\u304c\u3042\u308b\u3068<br \/>\n\u305d\u306e\u3042\u3068\u306e\u5909\u6570x\u304c\u95a2\u6570\u306e\u5916\u306b\u51fa\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001<br \/>\nx = &#8216;\u30c1\u30ef\u30ef\u304c\u5927\u597d\u304d&#8217;<br \/>\n\u304cdaisuki\u3068\u3044\u3046\u95a2\u6570\u306e\u5916\u306b\u51fa\u3066\u3044\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u306b<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">y = daisuki()\r\nprint(y)<\/pre>\n<p>\u3067\u3001\u4e2d\u306b\u300e\u30c1\u30ef\u30ef\u304c\u5927\u597d\u304d\u300f\u3068\u3044\u3046\u6587\u5b57\u5217\u304c\u5165\u3063\u3066\u3044\u308b<br \/>\ndaisuki()\u3068\u3044\u3046\u95a2\u6570\u304c\u5909\u6570y\u306b\u4ee3\u5165\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066print(y)\u306b\u3088\u3063\u3066\u300e\u30c1\u30ef\u30ef\u304c\u5927\u597d\u304d\u300f<br \/>\n\u3068\u3044\u3046\u6587\u5b57\u5217\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068<br \/>\n\u300e\u30c1\u30ef\u30ef\u304c\u5927\u597d\u304d\u300f\u3068\u8868\u793a\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/modoritinn821.jpg\" alt=\"\u623b\u308a\u5024\" width=\"231\" height=\"172\" class=\"alignnone size-full wp-image-901\" \/><\/p>\n<p>\u3053\u308c\u304c\u623b\u308a\u5024\u306e\u8003\u3048\u65b9\u3067\u3059\u3002<\/p>\n<p>\u5f15\u6570\u3068\u5c11\u3057\u4f3c\u3066\u3044\u307e\u3059\u304c<br \/>\n\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u307e\u3063\u305f\u304f\u9006\u3067\u3059\u3002<\/p>\n<p>\u8a73\u3057\u304f\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<br \/>\n\u21d2<a href=\"https:\/\/python-introduction.com\/?p=879\" target=\"blank\">\u3010Python\u3011\u95a2\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u65b9\u6cd5\u30fb\u547c\u3073\u51fa\u3057\u3084\u5f15\u6570\u306b\u3064\u3044\u3066\u3082\u89e3\u8aac<\/a><\/p>\n<h2><span id=\"Python-2\">\u3010Python\u5165\u9580\u3011\u5f15\u6570\u3068\u623b\u308a\u5024\u3092\u4e00\u7dd2\u306b\u4f7f\u3046\u66f8\u304d\u65b9<\/span><\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/pasokonshouo821.jpg\" alt=\"\u5f15\u6570\u3068\u623b\u308a\u5024\u306e\u7d44\u307f\u5408\u308f\u305b\" width=\"616\" height=\"460\" class=\"alignnone size-full wp-image-903\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/pasokonshouo821.jpg 616w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/pasokonshouo821-300x224.jpg 300w\" sizes=\"(max-width: 616px) 100vw, 616px\" \/><\/p>\n<p>\u307e\u305a\u5148\u306b\u5f15\u6570\u3068\u623b\u308a\u5024\u306e\u57fa\u672c\u7684\u306a\u9055\u3044\u3092\u898b\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4f8b\u984c2\u306f\u5f15\u6570\u306e\u5177\u4f53\u4f8b\u3067\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c2\r\ndef daisuki(a):\r\n    print(a)\r\n     \r\ndaisuki('\u30d6\u30eb\u30c9\u30c3\u30b0')<\/pre>\n<p>\u4f8b\u984c2\u3092\u5b9f\u884c\u3059\u308b\u3068\u300e\u30d6\u30eb\u30c9\u30c3\u30b0\u300f\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306b\u5bfe\u3057\u3066\u4f8b\u984c1\u306f\u623b\u308a\u5024\u3067\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c1\r\ndef daisuki():\r\n    x = '\u30c1\u30ef\u30ef\u304c\u5927\u597d\u304d'\r\n    return x\r\n    \r\ny = daisuki()\r\nprint(y)<\/pre>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u300e\u30c1\u30ef\u30ef\u304c\u5927\u597d\u304d\u300f\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u5f15\u6570\u3068\u623b\u308a\u5024\u306e\u660e\u3089\u304b\u306a\u9055\u3044\u306f<\/p>\n<p>\u5f15\u6570\u306f<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">def daisuki(a):\r\n    print(a)<\/pre>\n<p>\u3068\u5b9a\u7fa9\u3057\u305f\u95a2\u6570\u306e\u3068\u3053\u308d\u3067\u5177\u4f53\u7684\u306a\u5024\u304c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u308c\u306b\u5bfe\u3057\u3066\u623b\u308a\u5024\u306f<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">def daisuki():\r\n    x = '\u30c1\u30ef\u30ef\u304c\u5927\u597d\u304d'\r\n    return x<\/pre>\n<p>\u5b9a\u7fa9\u3057\u305f\u95a2\u6570\u306e\u3068\u3053\u308d\u3067<br \/>\n\u5909\u6570x\u3068\u3044\u3046\u5f62\u3067\u5177\u4f53\u7684\u306a\u6587\u5b57\u5217\u304c\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u623b\u308a\u5024\u306e\u5834\u5408\u306b\u306freturn\u304c\u3042\u3063\u3066<br \/>\n\u5916\u90e8\u306b\u5177\u4f53\u7684\u306a\u6587\u5b57\u5217\u3092\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u3053\u3053\u304b\u3089\u304c\u672c\u984c\u3067\u3059\u3002<\/p>\n<p>\u623b\u308a\u5024\u3068\u5f15\u6570\u3092\u540c\u6642\u306b\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c3\r\ndef daisuki(x, y):\r\n    z = x + y\r\n    return z\r\n    \r\na = daisuki('\u30c1\u30ef\u30ef', '\u5927\u597d\u304d')\r\nprint(a)\r\n\r\nb = daisuki('\u30d6\u30eb\u30c9\u30c3\u30b0', '\u7d20\u6575')\r\nprint(b)<\/pre>\n<p>\u307e\u305a\u4f8b\u984c3\u3067\u306f<br \/>\ndef daisuki(x, y):<br \/>\ndaisuki\u3068\u3044\u3046\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3064\u3064<br \/>\n()\u306e\u4e2d\u306b\u3042\u308bx\u3068y\u3068\u3044\u3046\u5024\u304c\u5f15\u6570\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">    z = x + y<\/pre>\n<p>\u306b\u3088\u3063\u3066\u3001\u5f15\u6570\u3067\u3042\u308bx\u3068y\u3092\u8db3\u3057\u3066\u5909\u6570z\u306b\u4ee3\u5165\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u304b\u3089\u5909\u6570z\u306e\u5024\u306b\u5bfe\u3057\u3066<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">    return z<\/pre>\n<p>\u623b\u308a\u5024\u3068\u3057\u3066\u8fd4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">a = daisuki('\u30c1\u30ef\u30ef', '\u5927\u597d\u304d')\r\nprint(a)<\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u95a2\u6570daisuki\u3092\u547c\u3073\u51fa\u3059\u3068\u304d\u306b<br \/>\n\u300e\u30c1\u30ef\u30ef\u300f\u3001\u300e\u5927\u597d\u304d\u300f\u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u6e21\u3057\u3066<br \/>\n\u623b\u3063\u3066\u304d\u305f\u5024\u306f\u5909\u6570a\u306b\u5165\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066print(a)\u3067\u8868\u793a\u3055\u305b\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u6642\u70b9\u3067\u5b9f\u884c\u3059\u308b\u3068<br \/>\n\u300e\u30c1\u30ef\u30ef\u5927\u597d\u304d\u300f\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u6587\u5b57\u5217\u3068\u6587\u5b57\u5217\u3092\uff0b\u3067\u8db3\u3059\u3068<br \/>\n\u6587\u5b57\u5217\u304c\u7d50\u5408\u3055\u308c\u308b\u304b\u3089\u3067\u3059\u3002<br \/>\n\u6587\u5b57\u5217\u306e\u7d50\u5408\u306b\u3064\u3044\u3066\u306f\u30b3\u30c1\u30e9\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u21d2<a href=\"https:\/\/python-introduction.com\/?p=581\" target=\"blank\">\u3010Python\u3011\u6587\u5b57\u5217\u3092\u7d50\u5408\u30fb\u62bd\u51fa\u3057\u305f\u308a\u7e70\u308a\u8fd4\u3057\u305f\u308a\u3059\u308b\u65b9\u6cd5<\/a><\/p>\n<p>\u7d9a\u3044\u3066<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">b = daisuki('\u30d6\u30eb\u30c9\u30c3\u30b0', '\u7d20\u6575')<\/pre>\n<p>&#8216;\u30d6\u30eb\u30c9\u30c3\u30b0&#8217;\u3068 &#8216;\u7d20\u6575&#8217;\u3092\u5f15\u6570\u3068\u3057\u3066\u6e21\u3057\u3066<br \/>\n\u623b\u3063\u3066\u304d\u305f\u623b\u308a\u5024\u306f\u5909\u6570b\u306b\u4ee3\u5165\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u300e\u30d6\u30eb\u30c9\u30c3\u30b0\u7d20\u6575\u300f\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/hikisuumodoritis821.jpg\" alt=\"\u5f15\u6570\u3068\u623b\u308a\u5024\" width=\"270\" height=\"230\" class=\"alignnone size-full wp-image-907\" \/><\/p>\n<h2><span id=\"Python-3\">\u3010Python\u5165\u9580\u3011\u8907\u6570\u306e\u5024\u3092\u623b\u308a\u5024\u3068\u3057\u3066\u5f97\u308b\u65b9\u6cd5<\/span><\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/pasokokkknjosei820.jpg\" alt=\"\u623b\u308a\u5024 \u8907\u6570\" width=\"620\" height=\"414\" class=\"alignnone size-full wp-image-853\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/pasokokkknjosei820.jpg 620w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/pasokokkknjosei820-300x200.jpg 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/p>\n<p>\u5f53\u30d6\u30ed\u30b0\u306b\u300ePython\u3000\u623b\u308a\u5024 \u8907\u6570\u300f\u3068\u3044\u3046\u691c\u7d22\u3067<br \/>\n\u8a2a\u554f\u3057\u3066\u304f\u3060\u3055\u308b\u65b9\u306f\u591a\u3044\u3067\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001\u623b\u308a\u5024\u81ea\u4f53\u306f1\u3064\u3057\u304b\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\n\u3067\u3059\u304c\u3001\u3084\u308a\u65b9\u306b\u3088\u3063\u3066\u306f\u8907\u6570\u306e\u5024\u3092<br \/>\n\u623b\u308a\u5024\u3068\u3057\u3066\u5f97\u308b\u3053\u3068\u306f\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u3084\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">#\u4f8b\u984c4\uff08\u30bf\u30d7\u30eb\u3092\u4f7f\u3046\u3053\u3068\u3067\u8907\u6570\u306e\u623b\u308a\u5024\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff09\r\ndef daisuki(x, y):\r\n    a = x + y\r\n    b = x * 2 + y\r\n    return (a, b)\r\n    \r\nz = daisuki('\u3068\u3063\u3066\u3082', '\u5927\u597d\u304d')\r\nprint(z)<\/pre>\n<p>\u30bf\u30d7\u30eb\u3092\u4f7f\u3046\u3053\u3068\u3067\u8907\u6570\u306e\u623b\u308a\u5024\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u300c\u30bf\u30d7\u30eb\u3063\u3066\u4f55\uff1f\u300d<br \/>\n\u3068\u6c17\u306b\u306a\u308b\u65b9\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<br \/>\n\u21d2<a href=\"https:\/\/python-introduction.com\/?p=658\" target=\"blank\">\u3010Python\u3011\u30bf\u30d7\u30eb\u3092\u4f7f\u30463\u3064\u306e\u30e1\u30ea\u30c3\u30c8\u3068\u30ea\u30b9\u30c8\u3068\u306e\u9055\u3044<\/a><\/p>\n<p>\u3053\u3053\u3067\u306f\u3068\u308a\u3042\u3048\u305a()\u3067\u304f\u304f\u308c\u3070\u30bf\u30d7\u30eb\u306b\u306a\u308b<br \/>\n\u3068\u601d\u3063\u3066\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">def daisuki(x, y):<\/pre>\n<p>\u3053\u3053\u3067\u5f15\u6570\u3068\u3057\u3066a\u3068b\u306e2\u3064\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u304b\u3089\u3001<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">    a = x + y\r\n    b = x * 2 + y<\/pre>\n<p>\u5909\u6570a\u306bx\u3068y\u3092\u8db3\u3057\u305f\u3082\u306e\u3092\u4ee3\u5165\u3057<br \/>\n\u5909\u6570b\u306b\u5909\u6570x\u30922\u56de\u5b9f\u884c\u3057\u305f\u3082\u306e\u3068y\u3092\u8db3\u3057\u3066\u4ee3\u5165\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u5909\u6570a\u3068b\u3092\uff08\uff09\u3067\u304f\u304f\u3063\u3066\u30bf\u30d7\u30eb\u306b\u3057\u3066\u623b\u308a\u5024\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">    return (a, b)<\/pre>\n<p>\u305d\u308c\u304b\u3089<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">z = daisuki('\u3068\u3063\u3066\u3082', '\u5927\u597d\u304d')\r\nprint(z)<\/pre>\n<p>daisuki\u3068\u3044\u3046\u95a2\u6570\u3092\u547c\u3073\u51fa\u3057\u3066<br \/>\n\u3053\u3053\u3067\u306f\u5f15\u6570\u3068\u3057\u3066&#8217;\u3068\u3063\u3066\u3082&#8217;, &#8216;\u5927\u597d\u304d&#8217;\u3092\u6e21\u3057\u307e\u3059\u3002<br \/>\n\u3067\u3001\u623b\u3063\u3066\u304d\u305f\u623b\u308a\u5024\u3092\u5909\u6570z\u306b\u4ee3\u5165\u3057<br \/>\nprint\u6587\u3067\u8868\u793a\u3055\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u884c\u3059\u308b\u3068<br \/>\n(&#8216;\u3068\u3063\u3066\u3082\u5927\u597d\u304d&#8217;, &#8216;\u3068\u3063\u3066\u3082\u3068\u3063\u3066\u3082\u5927\u597d\u304d&#8217;)<br \/>\n\u30682\u3064\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p>b = x * 2 + y<br \/>\n\u306fx\u3067\u3042\u308b\u300e\u3068\u3063\u3066\u3082\u300f\u30922\u56de\u3001<br \/>\ny\u3067\u3042\u308b\u300e\u5927\u597d\u304d\u300f\u30921\u56de\u306b\u3057\u3066<br \/>\n\uff0b\u3067\u7d50\u5408\u3055\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u306a\u306e\u3067\u300e\u3068\u3063\u3066\u3082\u3068\u3063\u3066\u3082\u5927\u597d\u304d\u300f\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/hikisuuidii821.jpg\" alt=\"\u8907\u6570\u306e\u623b\u308a\u5024\" width=\"426\" height=\"208\" class=\"alignnone size-full wp-image-909\" srcset=\"https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/hikisuuidii821.jpg 426w, https:\/\/python-introduction.com\/wp-content\/uploads\/2018\/08\/hikisuuidii821-300x146.jpg 300w\" sizes=\"(max-width: 426px) 100vw, 426px\" \/><\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u3053\u3053\u3067\u7d42\u308f\u308a\u307e\u3059\u3002<br \/>\n\u5f15\u6570\u3068\u623b\u308a\u5024\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067<br \/>\n\u3088\u308a\u8907\u96d1\u306a\u95a2\u6570\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u524d\u56de\u306e\u8a18\u4e8b\u3067\u306f\u5f15\u6570\u3092\u4f7f\u3063\u3066 \u5916\u90e8\u306e\u5024\u3092\u5b9a\u7fa9\u3057\u305f\u95a2\u6570\u306b\u5f15\u304d\u6e21\u3059\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002 \u8a73\u3057\u304f\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 \u21d2\u3010Python\u3011\u95a2\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u65b9\u6cd5\u30fb\u547c\u3073\u51fa\u3057\u3084\u5f15\u6570\u306b\u3064\u3044\u3066\u3082\u89e3\u8aac \u4eca\u56de\u306f\u623b\u308a\u5024\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057 [&hellip;]","protected":false},"author":1,"featured_media":888,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,39],"tags":[3,79,57,75],"_links":{"self":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/897"}],"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=897"}],"version-history":[{"count":8,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/897\/revisions"}],"predecessor-version":[{"id":910,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/posts\/897\/revisions\/910"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=\/wp\/v2\/media\/888"}],"wp:attachment":[{"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/python-introduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}