{"id":43049,"date":"2025-07-29T19:42:54","date_gmt":"2025-07-29T10:42:54","guid":{"rendered":"https:\/\/techgym.jp\/?p=43049"},"modified":"2025-10-20T00:08:14","modified_gmt":"2025-10-19T15:08:14","slug":"python-reduce","status":"publish","type":"post","link":"https:\/\/techgym.jp\/column\/python-reduce\/","title":{"rendered":"reduce\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u3092\u5fb9\u5e95\u89e3\u8aac\uff01\u521d\u5fc3\u8005\u3067\u3082\u308f\u304b\u308b\u96c6\u7d04\u51e6\u7406\u306e\u5b8c\u5168\u30ac\u30a4\u30c9"},"content":{"rendered":"\n<p><iframe loading=\"lazy\" width=\"560\" height=\"314\" src=\"\/\/www.youtube.com\/embed\/7iX9nAJE0cE\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u30ea\u30b9\u30c8\u306e\u8981\u7d20\u3092\u9806\u6b21\u51e6\u7406\u3057\u3066\u4e00\u3064\u306e\u5024\u306b\u96c6\u7d04\u3057\u305f\u3044\u6642\u306b\u6d3b\u8e8d\u3059\u308b\u306e\u304c\u300creduce\u95a2\u6570\u300d\u3067\u3059\u3002\u300c\u5408\u8a08\u3084\u7a4d\u3092\u8a08\u7b97\u3057\u305f\u3044\u300d\u300c\u30ea\u30b9\u30c8\u304b\u3089\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u6c42\u3081\u305f\u3044\u300d\u3068\u3044\u3063\u305f\u5834\u9762\u3067\u975e\u5e38\u306b\u4fbf\u5229\u306a\u6a5f\u80fd\u3067\u3059\u304c\u3001\u300c\u4f7f\u3044\u65b9\u304c\u96e3\u3057\u305d\u3046\u300d\u300c\u3069\u3093\u306a\u6642\u306b\u4f7f\u3048\u3070\u3044\u3044\u306e\uff1f\u300d\u3068\u60a9\u3080\u65b9\u3082\u591a\u3044\u3067\u3057\u3087\u3046\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Python\u306ereduce\u95a2\u6570\u306e\u57fa\u672c\u304b\u3089\u5b9f\u8df5\u7684\u306a\u6d3b\u7528\u6cd5\u307e\u3067\u3001\u8c4a\u5bcc\u306a\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3068\u3068\u3082\u306b\u5fb9\u5e95\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n<h2>reduce\u95a2\u6570\u3068\u306f\uff1f\u57fa\u672c\u6982\u5ff5\u3092\u7406\u89e3\u3057\u3088\u3046<\/h2>\n<p><strong>reduce\u95a2\u6570<\/strong>\u306f\u3001\u6307\u5b9a\u3057\u305f\u95a2\u6570\u3092\u4f7f\u3063\u3066\u30a4\u30c6\u30e9\u30d6\u30eb\uff08\u30ea\u30b9\u30c8\u3001\u30bf\u30d7\u30eb\u306a\u3069\uff09\u306e\u8981\u7d20\u3092\u9806\u6b21\u51e6\u7406\u3057\u3001\u6700\u7d42\u7684\u306b\u4e00\u3064\u306e\u5024\u306b\u96c6\u7d04\u3059\u308bPython\u306e\u95a2\u6570\u3067\u3059\u3002<code>functools<\/code>\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>reduce\u95a2\u6570\u306e\u57fa\u672c\u69cb\u6587<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\nreduce(function, iterable[, initializer])\n<\/code><\/pre>\n<ul>\n<li><strong>function<\/strong>: 2\u3064\u306e\u5f15\u6570\u3092\u53d7\u3051\u53d6\u308a1\u3064\u306e\u5024\u3092\u8fd4\u3059\u95a2\u6570<\/li>\n<li><strong>iterable<\/strong>: \u51e6\u7406\u5bfe\u8c61\u306e\u30c7\u30fc\u30bf\uff08\u30ea\u30b9\u30c8\u3001\u30bf\u30d7\u30eb\u306a\u3069\uff09<\/li>\n<li><strong>initializer<\/strong>: \u521d\u671f\u5024\uff08\u7701\u7565\u53ef\u80fd\uff09<\/li>\n<\/ul>\n<h3>\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u306areduce\u95a2\u6570\u306e\u4f8b<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nnumbers = [1, 2, 3, 4, 5]\n\n# \u30ea\u30b9\u30c8\u306e\u5408\u8a08\u3092\u8a08\u7b97\ntotal = reduce(lambda x, y: x + y, numbers)\nprint(total)  # \u51fa\u529b: 15\n<\/code><\/pre>\n<h2>reduce\u95a2\u6570\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/h2>\n<h3>\u6570\u5024\u306e\u96c6\u7d04\u51e6\u7406<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nnumbers = [1, 2, 3, 4, 5]\n\n# \u5408\u8a08\u3092\u8a08\u7b97\nsum_result = reduce(lambda x, y: x + y, numbers)\nprint(sum_result)  # \u51fa\u529b: 15\n\n# \u7a4d\u3092\u8a08\u7b97\nproduct = reduce(lambda x, y: x * y, numbers)\nprint(product)  # \u51fa\u529b: 120\n\n# \u6700\u5927\u5024\u3092\u53d6\u5f97\nmaximum = reduce(lambda x, y: x if x &gt; y else y, numbers)\nprint(maximum)  # \u51fa\u529b: 5\n\n# \u6700\u5c0f\u5024\u3092\u53d6\u5f97\nminimum = reduce(lambda x, y: x if x &lt; y else y, numbers)\nprint(minimum)  # \u51fa\u529b: 1\n<\/code><\/pre>\n<h3>\u6587\u5b57\u5217\u306e\u96c6\u7d04\u51e6\u7406<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nwords = [\"Hello\", \" \", \"World\", \"!\"]\n\n# \u6587\u5b57\u5217\u3092\u9023\u7d50\nsentence = reduce(lambda x, y: x + y, words)\nprint(sentence)  # \u51fa\u529b: Hello World!\n\n# \u6700\u9577\u306e\u6587\u5b57\u5217\u3092\u53d6\u5f97\nlongest = reduce(lambda x, y: x if len(x) &gt; len(y) else y, [\"cat\", \"elephant\", \"dog\"])\nprint(longest)  # \u51fa\u529b: elephant\n<\/code><\/pre>\n<h2>\u521d\u671f\u5024\u3092\u4f7f\u3063\u305freduce\u95a2\u6570<\/h2>\n<h3>\u521d\u671f\u5024\u306e\u6307\u5b9a<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nnumbers = [1, 2, 3, 4, 5]\n\n# \u521d\u671f\u5024100\u304b\u3089\u30b9\u30bf\u30fc\u30c8\u3057\u3066\u5408\u8a08\nsum_with_init = reduce(lambda x, y: x + y, numbers, 100)\nprint(sum_with_init)  # \u51fa\u529b: 115 (100 + 15)\n\n# \u521d\u671f\u50241\u304b\u3089\u30b9\u30bf\u30fc\u30c8\u3057\u3066\u7a4d\nproduct_with_init = reduce(lambda x, y: x * y, numbers, 1)\nprint(product_with_init)  # \u51fa\u529b: 120\n\n# \u7a7a\u30ea\u30b9\u30c8\u306e\u5834\u5408\nempty_list = []\nsafe_sum = reduce(lambda x, y: x + y, empty_list, 0)\nprint(safe_sum)  # \u51fa\u529b: 0\n<\/code><\/pre>\n<h3>\u521d\u671f\u5024\u304c\u91cd\u8981\u306a\u5834\u9762<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\n# \u30ea\u30b9\u30c8\u306e\u8981\u7d20\u6570\u3092\u30ab\u30a6\u30f3\u30c8\nitems = [\"apple\", \"banana\", \"cherry\"]\ncount = reduce(lambda acc, item: acc + 1, items, 0)\nprint(count)  # \u51fa\u529b: 3\n\n# \u6761\u4ef6\u306b\u5408\u3046\u8981\u7d20\u306e\u6570\u3092\u30ab\u30a6\u30f3\u30c8\nnumbers = [1, 2, 3, 4, 5, 6]\neven_count = reduce(lambda acc, x: acc + (1 if x % 2 == 0 else 0), numbers, 0)\nprint(even_count)  # \u51fa\u529b: 3\n<\/code><\/pre>\n<h2>\u901a\u5e38\u306e\u95a2\u6570\u3092\u4f7f\u3063\u305freduce\u95a2\u6570<\/h2>\n<h3>\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066reduce\u306b\u6e21\u3059<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\ndef add(x, y):\n    return x + y\n\ndef multiply(x, y):\n    return x * y\n\ndef get_max(x, y):\n    return x if x &gt; y else y\n\nnumbers = [1, 2, 3, 4, 5]\n\n# \u95a2\u6570\u3092\u4f7f\u7528\nsum_result = reduce(add, numbers)\nproduct_result = reduce(multiply, numbers)\nmax_result = reduce(get_max, numbers)\n\nprint(sum_result)    # \u51fa\u529b: 15\nprint(product_result) # \u51fa\u529b: 120\nprint(max_result)    # \ucd9c\ub825: 5\n<\/code><\/pre>\n<h3>\u3088\u308a\u8907\u96d1\u306a\u96c6\u7d04\u95a2\u6570<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\ndef combine_stats(acc, value):\n    return {\n        'sum': acc['sum'] + value,\n        'count': acc['count'] + 1,\n        'max': max(acc['max'], value),\n        'min': min(acc['min'], value)\n    }\n\nnumbers = [3, 1, 4, 1, 5, 9, 2]\ninitial = {'sum': 0, 'count': 0, 'max': float('-inf'), 'min': float('inf')}\n\nstats = reduce(combine_stats, numbers, initial)\nstats['average'] = stats['sum'] \/ stats['count']\nprint(stats)  # \u51fa\u529b: {'sum': 25, 'count': 7, 'max': 9, 'min': 1, 'average': 3.57...}\n<\/code><\/pre>\n<h2>\u30ea\u30b9\u30c8\u306e\u8981\u7d20\u3092\u8f9e\u66f8\u306b\u96c6\u7d04<\/h2>\n<h3>\u8f9e\u66f8\u306e\u69cb\u7bc9<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\n# \u30ad\u30fc\u3068\u5024\u306e\u30da\u30a2\u304b\u3089\u8f9e\u66f8\u3092\u69cb\u7bc9\npairs = [('a', 1), ('b', 2), ('c', 3)]\n\ndef build_dict(acc, pair):\n    key, value = pair\n    acc[key] = value\n    return acc\n\nresult_dict = reduce(build_dict, pairs, {})\nprint(result_dict)  # \u51fa\u529b: {'a': 1, 'b': 2, 'c': 3}\n\n# \u6587\u5b57\u5217\u306e\u30ea\u30b9\u30c8\u304b\u3089\u6587\u5b57\u6570\u30ab\u30a6\u30f3\u30c8\u8f9e\u66f8\u3092\u4f5c\u6210\nwords = ['apple', 'banana', 'apple', 'cherry', 'banana', 'apple']\n\ndef count_words(acc, word):\n    acc[word] = acc.get(word, 0) + 1\n    return acc\n\nword_count = reduce(count_words, words, {})\nprint(word_count)  # \u51fa\u529b: {'apple': 3, 'banana': 2, 'cherry': 1}\n<\/code><\/pre>\n<h3>\u30b0\u30eb\u30fc\u30d7\u5316\u51e6\u7406<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nstudents = [\n    {'name': 'Alice', 'grade': 'A', 'subject': 'Math'},\n    {'name': 'Bob', 'grade': 'B', 'subject': 'Math'},\n    {'name': 'Charlie', 'grade': 'A', 'subject': 'Science'},\n    {'name': 'Diana', 'grade': 'B', 'subject': 'Math'}\n]\n\ndef group_by_grade(acc, student):\n    grade = student['grade']\n    if grade not in acc:\n        acc[grade] = []\n    acc[grade].append(student['name'])\n    return acc\n\ngrouped = reduce(group_by_grade, students, {})\nprint(grouped)  # \u51fa\u529b: {'A': ['Alice', 'Charlie'], 'B': ['Bob', 'Diana']}\n<\/code><\/pre>\n<h2>\u30cd\u30b9\u30c8\u3057\u305f\u30c7\u30fc\u30bf\u69cb\u9020\u306e\u51e6\u7406<\/h2>\n<h3>\u30cd\u30b9\u30c8\u3057\u305f\u30ea\u30b9\u30c8\u306e\u5e73\u5766\u5316<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nnested_list = [[1, 2], [3, 4], [5, 6]]\n\n# \u30ea\u30b9\u30c8\u3092\u5e73\u5766\u5316\nflattened = reduce(lambda acc, sublist: acc + sublist, nested_list, [])\nprint(flattened)  # \ucd9c\ub825: [1, 2, 3, 4, 5, 6]\n\n# \u3088\u308a\u8907\u96d1\u306a\u30cd\u30b9\u30c8\u69cb\u9020\ncomplex_nested = [[[1, 2], [3]], [[4, 5, 6]], [[7], [8, 9]]]\ndouble_flattened = reduce(lambda acc, x: acc + x, \n                         reduce(lambda acc, x: acc + x, complex_nested, []), [])\nprint(double_flattened)  # \ucd9c\ub825: [1, 2, 3, 4, 5, 6, 7, 8, 9]\n<\/code><\/pre>\n<h3>JSON\u30c7\u30fc\u30bf\u306e\u6df1\u3044\u30de\u30fc\u30b8<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\ndef deep_merge(dict1, dict2):\n    result = dict1.copy()\n    for key, value in dict2.items():\n        if key in result and isinstance(result[key], dict) and isinstance(value, dict):\n            result[key] = deep_merge(result[key], value)\n        else:\n            result[key] = value\n    return result\n\nconfigs = [\n    {'database': {'host': 'localhost', 'port': 5432}},\n    {'database': {'user': 'admin'}, 'cache': {'enabled': True}},\n    {'database': {'password': 'secret'}, 'logging': {'level': 'INFO'}}\n]\n\nmerged_config = reduce(deep_merge, configs, {})\nprint(merged_config)\n<\/code><\/pre>\n<h2>\u6570\u5b66\u7684\u8a08\u7b97\u3067\u306e\u6d3b\u7528<\/h2>\n<h3>\u968e\u4e57\u306e\u8a08\u7b97<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\ndef factorial(n):\n    if n &lt;= 1:\n        return 1\n    return reduce(lambda x, y: x * y, range(1, n + 1))\n\n# 5\u306e\u968e\u4e57\u3092\u8a08\u7b97\nresult = factorial(5)\nprint(result)  # \ucd9c\ub825: 120\n\n# \u7bc4\u56f2\u6307\u5b9a\u3067\u306e\u7a4d\nnumbers = range(2, 6)  # 2, 3, 4, 5\nproduct = reduce(lambda x, y: x * y, numbers)\nprint(product)  # \ucd9c\ub825: 120\n<\/code><\/pre>\n<h3>\u6700\u5927\u516c\u7d04\u6570\u30fb\u6700\u5c0f\u516c\u500d\u6570<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\nimport math\n\ndef gcd_multiple(numbers):\n    return reduce(math.gcd, numbers)\n\ndef lcm_two(a, b):\n    return abs(a * b) \/\/ math.gcd(a, b)\n\ndef lcm_multiple(numbers):\n    return reduce(lcm_two, numbers)\n\nnumbers = [12, 18, 24]\nprint(gcd_multiple(numbers))  # \ucd9c\ub825: 6\nprint(lcm_multiple(numbers))  # \ucd9c\ub825: 72\n<\/code><\/pre>\n<h2>reduce\u95a2\u6570 vs \u4ed6\u306e\u65b9\u6cd5\u306e\u6bd4\u8f03<\/h2>\n<h3>sum()\u95a2\u6570\u3068\u306e\u6bd4\u8f03<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nnumbers = [1, 2, 3, 4, 5]\n\n# reduce\u4f7f\u7528\nsum_reduce = reduce(lambda x, y: x + y, numbers)\n\n# sum()\u95a2\u6570\u4f7f\u7528\uff08\u63a8\u5968\uff09\nsum_builtin = sum(numbers)\n\nprint(sum_reduce == sum_builtin)  # \ucd9c\ub825: True\n<\/code><\/pre>\n<h3>max()\u3001min()\u95a2\u6570\u3068\u306e\u6bd4\u8f03<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nnumbers = [3, 1, 4, 1, 5, 9, 2]\n\n# reduce\u4f7f\u7528\nmax_reduce = reduce(lambda x, y: x if x &gt; y else y, numbers)\nmin_reduce = reduce(lambda x, y: x if x &lt; y else y, numbers)\n\n# \u7d44\u307f\u8fbc\u307f\u95a2\u6570\u4f7f\u7528\uff08\u63a8\u5968\uff09\nmax_builtin = max(numbers)\nmin_builtin = min(numbers)\n\nprint(max_reduce == max_builtin)  # \ucd9c\ub825: True\nprint(min_reduce == min_builtin)  # \ucd9c\ub825: True\n<\/code><\/pre>\n<h3>\u30eb\u30fc\u30d7\u3068\u306e\u6bd4\u8f03<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nnumbers = [1, 2, 3, 4, 5]\n\n# reduce\u4f7f\u7528\nproduct_reduce = reduce(lambda x, y: x * y, numbers)\n\n# for\u30eb\u30fc\u30d7\u4f7f\u7528\nproduct_loop = 1\nfor num in numbers:\n    product_loop *= num\n\nprint(product_reduce == product_loop)  # \ucd9c\ub825: True\n<\/code><\/pre>\n<h2>\u6587\u5b57\u5217\u51e6\u7406\u3067\u306ereduce\u6d3b\u7528<\/h2>\n<h3>\u30d1\u30b9\u7d50\u5408<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\nimport os\n\npath_parts = ['home', 'user', 'documents', 'projects', 'python']\n\n# \u30d1\u30b9\u3092\u7d50\u5408\nfull_path = reduce(os.path.join, path_parts)\nprint(full_path)  # \ucd9c\ub825: home\/user\/documents\/projects\/python\n\n# URL\u30d1\u30b9\u306e\u7d50\u5408\nurl_parts = ['https:\/\/api.example.com', 'v1', 'users', '123', 'profile']\nurl = reduce(lambda x, y: f\"{x}\/{y}\", url_parts)\nprint(url)  # \ucd9c\ub825: https:\/\/api.example.com\/v1\/users\/123\/profile\n<\/code><\/pre>\n<h3>\u30c6\u30ad\u30b9\u30c8\u51e6\u7406<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nsentences = [\n    \"Python is powerful.\",\n    \"Python is easy to learn.\",\n    \"Python is versatile.\"\n]\n\n# \u5171\u901a\u306e\u5358\u8a9e\u3092\u62bd\u51fa\ndef find_common_words(text1, text2):\n    words1 = set(text1.lower().split())\n    words2 = set(text2.lower().split())\n    return ' '.join(words1 &amp; words2)\n\ncommon = reduce(find_common_words, sentences)\nprint(common)  # \ucd9c\ub825: python is\n<\/code><\/pre>\n<h2>\u30c7\u30fc\u30bf\u5206\u6790\u3067\u306ereduce\u6d3b\u7528<\/h2>\n<h3>\u7d71\u8a08\u8a08\u7b97<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\ndata_points = [\n    {'value': 10, 'weight': 2},\n    {'value': 20, 'weight': 3},\n    {'value': 30, 'weight': 1}\n]\n\n# \u52a0\u91cd\u5e73\u5747\u3092\u8a08\u7b97\ndef weighted_average_accumulator(acc, point):\n    return {\n        'sum_weighted': acc['sum_weighted'] + point['value'] * point['weight'],\n        'sum_weights': acc['sum_weights'] + point['weight']\n    }\n\nresult = reduce(weighted_average_accumulator, data_points, {'sum_weighted': 0, 'sum_weights': 0})\nweighted_avg = result['sum_weighted'] \/ result['sum_weights']\nprint(weighted_avg)  # \ucd9c\ub825: 17.5\n<\/code><\/pre>\n<h3>\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u306e\u51e6\u7406<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\ndaily_sales = [\n    {'date': '2024-01-01', 'sales': 1000},\n    {'date': '2024-01-02', 'sales': 1200},\n    {'date': '2024-01-03', 'sales': 800},\n    {'date': '2024-01-04', 'sales': 1500}\n]\n\n# \u7d2f\u7a4d\u58f2\u4e0a\u3092\u8a08\u7b97\ndef accumulate_sales(acc, day):\n    cumulative = acc['cumulative'] + day['sales']\n    acc['daily_data'].append({\n        'date': day['date'],\n        'daily_sales': day['sales'],\n        'cumulative_sales': cumulative\n    })\n    acc['cumulative'] = cumulative\n    return acc\n\nresult = reduce(accumulate_sales, daily_sales, {'cumulative': 0, 'daily_data': []})\nprint(result['daily_data'])\n<\/code><\/pre>\n<h2>\u5b9f\u8df5\u7684\u306areduce\u95a2\u6570\u306e\u5fdc\u7528\u4f8b<\/h2>\n<h3>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u30de\u30fc\u30b8<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\n# \u8907\u6570\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u30de\u30fc\u30b8\nbase_config = {'debug': False, 'port': 8000}\ndev_config = {'debug': True, 'database': {'host': 'localhost'}}\nprod_config = {'port': 80, 'database': {'host': 'prod.example.com'}}\n\nconfigs = [base_config, dev_config, prod_config]\n\ndef merge_configs(acc, config):\n    return {**acc, **config}\n\nfinal_config = reduce(merge_configs, configs)\nprint(final_config)\n<\/code><\/pre>\n<h3>\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306e\u89e3\u6790<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nlog_entries = [\n    \"2024-01-01 10:00 INFO User login\",\n    \"2024-01-01 10:05 ERROR Database error\",\n    \"2024-01-01 10:10 INFO User logout\",\n    \"2024-01-01 10:15 ERROR Network timeout\"\n]\n\ndef analyze_logs(acc, entry):\n    parts = entry.split()\n    level = parts[2]\n    acc['total'] += 1\n    acc['by_level'][level] = acc['by_level'].get(level, 0) + 1\n    return acc\n\ninitial = {'total': 0, 'by_level': {}}\nlog_stats = reduce(analyze_logs, log_entries, initial)\nprint(log_stats)  # \ucd9c\ub825: {'total': 4, 'by_level': {'INFO': 2, 'ERROR': 2}}\n<\/code><\/pre>\n<h3>\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u306e\u96c6\u8a08<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nfile_info = [\n    {'name': 'document.pdf', 'size': 1024000},\n    {'name': 'image.jpg', 'size': 512000},\n    {'name': 'video.mp4', 'size': 10240000}\n]\n\ndef sum_file_sizes(acc, file):\n    acc['total_size'] += file['size']\n    acc['file_count'] += 1\n    acc['largest'] = file if file['size'] &gt; acc['largest']['size'] else acc['largest']\n    return acc\n\ninitial = {'total_size': 0, 'file_count': 0, 'largest': {'size': 0}}\nsummary = reduce(sum_file_sizes, file_info, initial)\nprint(f\"Total: {summary['total_size']:,} bytes\")\nprint(f\"Largest: {summary['largest']['name']}\")\n<\/code><\/pre>\n<h2>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u8003\u616e<\/h2>\n<h3>\u30e1\u30e2\u30ea\u52b9\u7387\u7684\u306a\u51e6\u7406<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\n# \u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u6271\u3046\u5834\u5408\u306e\u30e1\u30e2\u30ea\u52b9\u7387\ndef memory_efficient_sum(iterable):\n    return reduce(lambda x, y: x + y, iterable, 0)\n\n# \u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\nlarge_numbers = (x for x in range(1000000))\ntotal = reduce(lambda x, y: x + y, large_numbers, 0)\nprint(total)\n<\/code><\/pre>\n<h3>\u65e9\u671f\u7d42\u4e86\u306e\u5b9f\u88c5<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\ndef find_first_duplicate(items):\n    def check_duplicate(acc, item):\n        if item in acc['seen']:\n            acc['duplicate'] = item\n            return acc\n        acc['seen'].add(item)\n        return acc\n    \n    result = reduce(check_duplicate, items, {'seen': set(), 'duplicate': None})\n    return result['duplicate']\n\nnumbers = [1, 2, 3, 4, 2, 5, 6]\nduplicate = find_first_duplicate(numbers)\nprint(duplicate)  # \ucd9c\ub825: 2\n<\/code><\/pre>\n<h2>\u3088\u304f\u3042\u308b\u9593\u9055\u3044\u3068\u305d\u306e\u5bfe\u51e6\u6cd5<\/h2>\n<h3>\u521d\u671f\u5024\u306e\u8a2d\u5b9a\u5fd8\u308c<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\n# \u9593\u9055\u3044\uff1a\u7a7a\u30ea\u30b9\u30c8\u3067\u30a8\u30e9\u30fc\ntry:\n    empty_sum = reduce(lambda x, y: x + y, [])\nexcept TypeError as e:\n    print(f\"\u30a8\u30e9\u30fc: {e}\")\n\n# \u6b63\u3057\u3044\uff1a\u521d\u671f\u5024\u3092\u8a2d\u5b9a\nempty_sum = reduce(lambda x, y: x + y, [], 0)\nprint(empty_sum)  # \ucd9c\ub825: 0\n<\/code><\/pre>\n<h3>\u95a2\u6570\u306e\u5f15\u6570\u9806\u5e8f\u306e\u9593\u9055\u3044<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nnumbers = [1, 2, 3, 4, 5]\n\n# \u6b63\u3057\u3044\uff1aaccumulator, current_value \u306e\u9806\u5e8f\ncorrect_result = reduce(lambda acc, val: acc * 10 + val, numbers, 0)\nprint(correct_result)  # \ucd9c\ub825: 12345\n\n# \u52d5\u4f5c\u78ba\u8a8d\u306e\u305f\u3081\u306e\u30b9\u30c6\u30c3\u30d7\u8868\u793a\ndef debug_reduce(acc, val):\n    result = acc * 10 + val\n    print(f\"acc: {acc}, val: {val}, result: {result}\")\n    return result\n\nreduce(debug_reduce, [1, 2, 3], 0)\n<\/code><\/pre>\n<h3>\u53ef\u5909\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u64cd\u4f5c<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\n# \u5371\u967a\uff1a\u540c\u3058\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5909\u66f4\ndef dangerous_group(acc, item):\n    acc.append(item)  # \u526f\u4f5c\u7528\n    return acc\n\nitems = [1, 2, 3, 4]\n# \u3053\u306e\u3088\u3046\u306a\u4f7f\u3044\u65b9\u306f\u907f\u3051\u308b\n\n# \u5b89\u5168\uff1a\u65b0\u3057\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\ndef safe_group(acc, item):\n    return acc + [item]  # \u65b0\u3057\u3044\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\n\nresult = reduce(safe_group, items, [])\nprint(result)  # \ucd9c\ub825: [1, 2, 3, 4]\n<\/code><\/pre>\n<h2>reduce\u95a2\u6570\u3092\u4f7f\u3046\u3079\u304d\u5834\u9762\u30fb\u907f\u3051\u308b\u3079\u304d\u5834\u9762<\/h2>\n<h3>\u4f7f\u3046\u3079\u304d\u5834\u9762<\/h3>\n<p><strong>\u7d2f\u7a4d\u8a08\u7b97\u304c\u5fc5\u8981\u306a\u5834\u5408<\/strong><\/p>\n<pre><code class=\"language-python\">from functools import reduce\n\n# \u968e\u4e57\u8a08\u7b97\nfactorial = reduce(lambda x, y: x * y, range(1, 6))  # \u63a8\u5968\n\n# \u6587\u5b57\u5217\u306e\u9023\u7d50\uff08\u533a\u5207\u308a\u6587\u5b57\u3042\u308a\uff09\nresult = reduce(lambda x, y: f\"{x}, {y}\", [\"a\", \"b\", \"c\"])  # \u63a8\u5968\n<\/code><\/pre>\n<p><strong>\u30ab\u30b9\u30bf\u30e0\u96c6\u7d04\u30ed\u30b8\u30c3\u30af\u304c\u5fc5\u8981\u306a\u5834\u5408<\/strong><\/p>\n<pre><code class=\"language-python\"># \u8907\u96d1\u306a\u7d71\u8a08\u8a08\u7b97\nstats = reduce(custom_stats_function, data, initial_stats)  # \u63a8\u5968\n<\/code><\/pre>\n<h3>\u907f\u3051\u308b\u3079\u304d\u5834\u9762<\/h3>\n<p><strong>\u7d44\u307f\u8fbc\u307f\u95a2\u6570\u3067\u4ee3\u66ff\u53ef\u80fd\u306a\u5834\u5408<\/strong><\/p>\n<pre><code class=\"language-python\"># \u907f\u3051\u308b\nsum_reduce = reduce(lambda x, y: x + y, numbers)\n\n# \u63a8\u5968\nsum_builtin = sum(numbers)\n\n# \u907f\u3051\u308b\nmax_reduce = reduce(lambda x, y: x if x &gt; y else y, numbers)\n\n# \u63a8\u5968\nmax_builtin = max(numbers)\n<\/code><\/pre>\n<p><strong>\u5358\u7d14\u306a\u5909\u63db\u3084\u7d5e\u308a\u8fbc\u307f<\/strong><\/p>\n<pre><code class=\"language-python\"># \u907f\u3051\u308b\uff1areduce \u3067\u5909\u63db\ntransformed = reduce(lambda acc, x: acc + [x * 2], numbers, [])\n\n# \u63a8\u5968\uff1amap \u3092\u4f7f\u7528\ntransformed = list(map(lambda x: x * 2, numbers))\n<\/code><\/pre>\n<h2>\u9ad8\u5ea6\u306areduce\u95a2\u6570\u306e\u5fdc\u7528<\/h2>\n<h3>\u30ab\u30b9\u30bf\u30e0\u30c7\u30fc\u30bf\u578b\u3067\u306e\u4f7f\u7528<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\nclass Point:\n    def __init__(self, x, y):\n        self.x = x\n        self.y = y\n    \n    def __add__(self, other):\n        return Point(self.x + other.x, self.y + other.y)\n    \n    def __repr__(self):\n        return f\"Point({self.x}, {self.y})\"\n\npoints = [Point(1, 2), Point(3, 4), Point(5, 6)]\n\n# \u30dd\u30a4\u30f3\u30c8\u306e\u5408\u8a08\u3092\u8a08\u7b97\ntotal_point = reduce(lambda p1, p2: p1 + p2, points)\nprint(total_point)  # \ucd9c\ub825: Point(9, 12)\n<\/code><\/pre>\n<h3>\u95a2\u6570\u306e\u5408\u6210<\/h3>\n<pre><code class=\"language-python\">from functools import reduce\n\ndef compose_functions(*functions):\n    return reduce(lambda f, g: lambda x: f(g(x)), functions, lambda x: x)\n\n# \u8907\u6570\u306e\u95a2\u6570\u3092\u5408\u6210\nadd_one = lambda x: x + 1\nmultiply_two = lambda x: x * 2\nsquare = lambda x: x ** 2\n\ncomposed = compose_functions(square, multiply_two, add_one)\nresult = composed(3)  # ((3 + 1) * 2) ** 2 = 64\nprint(result)  # \ucd9c\ub825: 64\n<\/code><\/pre>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Python\u306ereduce\u95a2\u6570\u306f\u3001\u30c7\u30fc\u30bf\u306e\u96c6\u7d04\u51e6\u7406\u3092\u52b9\u7387\u7684\u306b\u884c\u3046\u305f\u3081\u306e\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002\u91cd\u8981\u306a\u30dd\u30a4\u30f3\u30c8\u3092\u307e\u3068\u3081\u308b\u3068\uff1a<\/p>\n<p><strong>reduce\u95a2\u6570\u306e\u57fa\u672c<\/strong><\/p>\n<ul>\n<li><code>functools<\/code>\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u3089\u30a4\u30f3\u30dd\u30fc\u30c8\u304c\u5fc5\u8981<\/li>\n<li><code>reduce(function, iterable[, initializer])<\/code> \u306e\u69cb\u6587<\/li>\n<li>2\u3064\u306e\u5f15\u6570\u3092\u53d7\u3051\u53d6\u308a1\u3064\u306e\u5024\u3092\u8fd4\u3059\u95a2\u6570\u3092\u4f7f\u7528<\/li>\n<\/ul>\n<p><strong>\u52b9\u679c\u7684\u306a\u4f7f\u7528\u5834\u9762<\/strong><\/p>\n<ul>\n<li>\u30ab\u30b9\u30bf\u30e0\u96c6\u7d04\u30ed\u30b8\u30c3\u30af\u304c\u5fc5\u8981\u306a\u5834\u5408<\/li>\n<li>\u7d2f\u7a4d\u8a08\u7b97\uff08\u968e\u4e57\u3001\u7d2f\u7a4d\u548c\u306a\u3069\uff09<\/li>\n<li>\u8907\u96d1\u306a\u30c7\u30fc\u30bf\u5909\u63db\u3084\u7d71\u8a08\u51e6\u7406<\/li>\n<li>\u30cd\u30b9\u30c8\u3057\u305f\u30c7\u30fc\u30bf\u69cb\u9020\u306e\u51e6\u7406<\/li>\n<\/ul>\n<p><strong>\u5b9f\u8df5\u7684\u306a\u6d3b\u7528\u65b9\u6cd5<\/strong><\/p>\n<ul>\n<li>\u8f9e\u66f8\u306e\u69cb\u7bc9\u3068\u30b0\u30eb\u30fc\u30d7\u5316<\/li>\n<li>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u30de\u30fc\u30b8<\/li>\n<li>\u7d71\u8a08\u8a08\u7b97\u3068\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u51e6\u7406<\/li>\n<li>\u6587\u5b57\u5217\u3084\u30d1\u30b9\u306e\u7d50\u5408<\/li>\n<\/ul>\n<p><strong>\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/strong><\/p>\n<ul>\n<li>\u521d\u671f\u5024\u3092\u9069\u5207\u306b\u8a2d\u5b9a<\/li>\n<li>\u7d44\u307f\u8fbc\u307f\u95a2\u6570\uff08sum\u3001max\u3001min\u306a\u3069\uff09\u3067\u4ee3\u66ff\u53ef\u80fd\u306a\u5834\u5408\u306f\u7d44\u307f\u8fbc\u307f\u95a2\u6570\u3092\u4f7f\u7528<\/li>\n<li>\u526f\u4f5c\u7528\u3092\u907f\u3051\u3001\u7d14\u7c8b\u95a2\u6570\u3092\u4f7f\u7528<\/li>\n<li>\u53ef\u8aad\u6027\u3092\u91cd\u8996\u3057\u3001\u8907\u96d1\u306a\u51e6\u7406\u306f\u901a\u5e38\u306e\u95a2\u6570\u3068\u3057\u3066\u5b9a\u7fa9<\/li>\n<\/ul>\n<p>reduce\u95a2\u6570\u3092\u30de\u30b9\u30bf\u30fc\u3059\u308b\u3053\u3068\u3067\u3001Python\u3067\u306e\u95a2\u6570\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u304c\u3088\u308a\u81ea\u7136\u306b\u66f8\u3051\u308b\u3088\u3046\u306b\u306a\u308a\u3001\u8907\u96d1\u306a\u30c7\u30fc\u30bf\u51e6\u7406\u3082\u52b9\u7387\u7684\u306b\u5b9f\u88c5\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u69d8\u3005\u306a\u30d1\u30bf\u30fc\u30f3\u3092\u8a66\u3057\u3066\u3001\u9069\u5207\u306a\u4f7f\u3044\u5206\u3051\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u25a0<a href=\"https:\/\/amzn.to\/3VxGkpx\">\u3089\u304f\u3089\u304fPython\u587e &#8211; \u8aad\u3080\u3060\u3051\u3067\u30de\u30b9\u30bf\u30fc<\/a><\/h2>\n\n\n\n<p><iframe loading=\"lazy\" width=\"560\" height=\"314\" src=\"\/\/www.youtube.com\/embed\/7iX9nAJE0cE\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n\n\n\n<p>\u25a0\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u30fb\u516c\u958b\u3057\u3066\u307f\u305f\uff01\uff01<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"VAtunAmVuc\"><a href=\"https:\/\/techgym.jp\/column\/ori-app\/\">\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u30fb\u516c\u958b\u3057\u3066\u307f\u305f\uff01\uff01<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u30d7\u30ed\u30f3\u30d7\u30c8\u3060\u3051\u3067\u30aa\u30ea\u30b8\u30ca\u30eb\u30a2\u30d7\u30ea\u3092\u958b\u767a\u30fb\u516c\u958b\u3057\u3066\u307f\u305f\uff01\uff01&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/column\/ori-app\/embed\/#?secret=AYasWXunBz#?secret=VAtunAmVuc\" data-secret=\"VAtunAmVuc\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u25a0AI\u6642\u4ee3\u306e\u7b2c\u4e00\u6b69\uff01\u300cAI\u99c6\u52d5\u958b\u767a\u30b3\u30fc\u30b9\u300d\u306f\u3058\u3081\u307e\u3057\u305f\uff01<\/p>\n\n\n\n<p>\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821\u3067\u5148\u884c\u958b\u59cb\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"fTOFm7yjqV\"><a href=\"https:\/\/techgym.jp\/about\/ai-driven-development\/\">AI\u99c6\u52d5\u958b\u767a\/\u751f\u6210AI\u30a8\u30f3\u30b8\u30cb\u30a2\u30b3\u30fc\u30b9\uff08\u521d\u5fc3\u8005\u5411\u3051\uff09<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;AI\u99c6\u52d5\u958b\u767a\/\u751f\u6210AI\u30a8\u30f3\u30b8\u30cb\u30a2\u30b3\u30fc\u30b9\uff08\u521d\u5fc3\u8005\u5411\u3051\uff09&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/about\/ai-driven-development\/embed\/#?secret=mxTx88XYHO#?secret=fTOFm7yjqV\" data-secret=\"fTOFm7yjqV\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u25a0\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821<\/p>\n\n\n\n<p>\u300c\u6b66\u7530\u587e\u300d\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u7248\u3068\u3044\u3048\u3070\u300c\u30c6\u30c3\u30af\u30b8\u30e0\u300d\u3002<br>\u8b1b\u7fa9\u52d5\u753b\u306a\u3057\u3001\u6559\u79d1\u66f8\u306a\u3057\u3002\u300c\u9032\u6357\u7ba1\u7406\u3068\u30b3\u30fc\u30c1\u30f3\u30b0\u300d\u3067\u52b9\u7387\u5b66\u7fd2\u3002<br>\u3088\u308a\u65e9\u304f\u3001\u3088\u308a\u5b89\u304f\u3001\u3057\u304b\u3082\u5bfe\u9762\u578b\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"WqGQaNvUZX\"><a href=\"https:\/\/techgym.jp\/tokyo\/tokyo_honko\/\">\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u30c6\u30c3\u30af\u30b8\u30e0\u6771\u4eac\u672c\u6821&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/tokyo\/tokyo_honko\/embed\/#?secret=DnUh9r1j3G#?secret=WqGQaNvUZX\" data-secret=\"WqGQaNvUZX\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff1c\u77ed\u671f\u8b1b\u7fd2\uff1e5\u65e5\u30675\u4e07\u5186\u306e\u300cPython\u30df\u30cb\u30ad\u30e3\u30f3\u30d7\u300d\u958b\u50ac\u4e2d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"YO2GE3R2hX\"><a href=\"https:\/\/techgym.jp\/event\/nagatacho_camp\/\">\u3010\u6700\u901f\u30fb\u78ba\u5b9f\u3011\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u653b\u7565\u300c\u6c38\u7530\u753aPython\u30df\u30cb\u30ad\u30e3\u30f3\u30d7\u300d\u30105\u65e5\u9593\u30675\u4e07\u5186\u3011<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u3010\u6700\u901f\u30fb\u78ba\u5b9f\u3011\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u653b\u7565\u300c\u6c38\u7530\u753aPython\u30df\u30cb\u30ad\u30e3\u30f3\u30d7\u300d\u30105\u65e5\u9593\u30675\u4e07\u5186\u3011&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/event\/nagatacho_camp\/embed\/#?secret=FXpUiF28wL#?secret=YO2GE3R2hX\" data-secret=\"YO2GE3R2hX\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff1c\u67081\u958b\u50ac\uff1e\u653e\u9001\u4f5c\u5bb6\u306b\u3088\u308b\u6620\u50cf\u30c7\u30a3\u30ec\u30af\u30bf\u30fc\u990a\u6210\u8b1b\u5ea7<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"zjkPKgzVdl\"><a href=\"https:\/\/techgym.jp\/event\/video_director\/\">\u73fe\u5f79\u653e\u9001\u4f5c\u5bb6\u304c\u6559\u3048\u308b\u52d5\u753b\u8b1b\u5ea7\uff01\u300e\uff24\uff2f\uff27\uff21\u300f<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u73fe\u5f79\u653e\u9001\u4f5c\u5bb6\u304c\u6559\u3048\u308b\u52d5\u753b\u8b1b\u5ea7\uff01\u300e\uff24\uff2f\uff27\uff21\u300f&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/event\/video_director\/embed\/#?secret=YIyadlBi9u#?secret=zjkPKgzVdl\" data-secret=\"zjkPKgzVdl\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff1c\u30aa\u30f3\u30e9\u30a4\u30f3\u7121\u6599\uff1e\u30bc\u30ed\u304b\u3089\u59cb\u3081\u308bPython\u7206\u901f\u8b1b\u5ea7<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"uOoiwiK4Gi\"><a href=\"https:\/\/techgym.jp\/tokyo_python\/\">\u3010\u7121\u6599\u30fb\u30aa\u30f3\u30e9\u30a4\u30f3\u3011\u30bc\u30ed\u304b\u3089\u306f\u3058\u3081\u308bPython\u7206\u901f\u8b1b\u5ea7<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u3010\u7121\u6599\u30fb\u30aa\u30f3\u30e9\u30a4\u30f3\u3011\u30bc\u30ed\u304b\u3089\u306f\u3058\u3081\u308bPython\u7206\u901f\u8b1b\u5ea7&#8221; &#8212; \u3010\u30c6\u30c3\u30af\u30b8\u30e0\u3011\u683c\u5b89\u30fb\u5bfe\u9762\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\" src=\"https:\/\/techgym.jp\/tokyo_python\/embed\/#?secret=kFNBB5Q7cE#?secret=uOoiwiK4Gi\" data-secret=\"uOoiwiK4Gi\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u30ea\u30b9\u30c8\u306e\u8981\u7d20\u3092\u9806\u6b21\u51e6\u7406\u3057\u3066\u4e00\u3064\u306e\u5024\u306b\u96c6\u7d04\u3057\u305f\u3044\u6642\u306b\u6d3b\u8e8d\u3059\u308b\u306e\u304c\u300creduce\u95a2\u6570\u300d\u3067\u3059\u3002\u300c\u5408\u8a08\u3084\u7a4d\u3092\u8a08\u7b97\u3057\u305f\u3044\u300d\u300c\u30ea\u30b9\u30c8\u304b\u3089\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u6c42\u3081\u305f\u3044\u300d\u3068\u3044\u3063\u305f\u5834\u9762\u3067\u975e\u5e38\u306b\u4fbf\u5229\u306a\u6a5f\u80fd\u3067\u3059\u304c\u3001\u300c\u4f7f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":42501,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-43049","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-column"],"views":121,"jetpack_featured_media_url":"\/wp-content\/uploads\/2025\/07\/f3403acf5c65aedec0dba821c4c26404.png","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts\/43049","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/comments?post=43049"}],"version-history":[{"count":0,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts\/43049\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/media\/42501"}],"wp:attachment":[{"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/media?parent=43049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/categories?post=43049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/tags?post=43049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}