{"id":43878,"date":"2025-08-05T17:05:10","date_gmt":"2025-08-05T08:05:10","guid":{"rendered":"https:\/\/techgym.jp\/?p=43878"},"modified":"2025-10-19T22:55:13","modified_gmt":"2025-10-19T13:55:13","slug":"python-2jigen-sort","status":"publish","type":"post","link":"https:\/\/techgym.jp\/column\/python-2jigen-sort\/","title":{"rendered":"Python2\u6b21\u5143\u914d\u5217\u30bd\u30fc\u30c8\u5b8c\u5168\u30ac\u30a4\u30c9 &#8211; \u30ea\u30b9\u30c8\u306e\u30ea\u30b9\u30c8\u4e26\u3073\u66ff\u3048\u30c6\u30af\u30cb\u30c3\u30af\u3092\u5fb9\u5e95\u89e3\u8aac"},"content":{"rendered":"\n<p><iframe loading=\"lazy\" width=\"560\" height=\"314\" src=\"\/\/www.youtube.com\/embed\/7iX9nAJE0cE\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>Python \u30672\u6b21\u5143\u914d\u5217\uff08\u30ea\u30b9\u30c8\u306e\u30ea\u30b9\u30c8\uff09\u3092\u30bd\u30fc\u30c8\u3059\u308b\u3053\u3068\u306f\u3001\u30c7\u30fc\u30bf\u5206\u6790\u3001\u884c\u5217\u64cd\u4f5c\u3001\u30c6\u30fc\u30d6\u30eb\u30c7\u30fc\u30bf\u306e\u51e6\u7406\u306b\u304a\u3044\u3066\u983b\u7e41\u306b\u5fc5\u8981\u3068\u306a\u308b\u64cd\u4f5c\u3067\u3059\u3002\u5358\u7d14\u306a\u6570\u5024\u306e\u4e26\u3073\u66ff\u3048\u304b\u3089\u3001\u8907\u6570\u306e\u6761\u4ef6\u306b\u3088\u308b\u8907\u96d1\u306a\u30bd\u30fc\u30c8\u307e\u3067\u3001\u69d8\u3005\u306a\u624b\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u30012\u6b21\u5143\u914d\u5217\u306e\u30bd\u30fc\u30c8\u306b\u95a2\u3059\u308b\u3042\u3089\u3086\u308b\u30c6\u30af\u30cb\u30c3\u30af\u3092\u5b9f\u4f8b\u3068\u3068\u3082\u306b\u8a73\u3057\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n<h2>1. \u57fa\u672c\u7684\u306a2\u6b21\u5143\u914d\u5217\u306e\u30bd\u30fc\u30c8<\/h2>\n<h3>\u884c\u3054\u3068\u306e\u30bd\u30fc\u30c8\uff08\u5404\u884c\u3092\u500b\u5225\u306b\u30bd\u30fc\u30c8\uff09<\/h3>\n<pre><code class=\"language-python\"># \u5404\u884c\u3092\u500b\u5225\u306b\u30bd\u30fc\u30c8\nmatrix = [\n    [3, 1, 4],\n    [6, 2, 5],\n    [9, 7, 8]\n]\n\n# \u5404\u884c\u3092\u6607\u9806\u30bd\u30fc\u30c8\nsorted_matrix = [sorted(row) for row in matrix]\nprint(\"\u884c\u3054\u3068\u30bd\u30fc\u30c8\u5f8c:\")\nfor row in sorted_matrix:\n    print(row)\n# [1, 3, 4]\n# [2, 5, 6]\n# [7, 8, 9]\n<\/code><\/pre>\n<h3>\u5217\u3054\u3068\u306e\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\"># \u5217\u3054\u3068\u306b\u30bd\u30fc\u30c8\nmatrix = [\n    [3, 1, 4],\n    [6, 2, 5],\n    [9, 7, 8]\n]\n\n# \u8ee2\u7f6e\u2192\u884c\u30bd\u30fc\u30c8\u2192\u8ee2\u7f6e\u3067\u5217\u30bd\u30fc\u30c8\u3092\u5b9f\u73fe\ndef sort_columns(matrix):\n    # \u8ee2\u7f6e\n    transposed = list(zip(*matrix))\n    # \u5404\u884c\uff08\u5143\u306e\u5217\uff09\u3092\u30bd\u30fc\u30c8\n    sorted_columns = [sorted(col) for col in transposed]\n    # \u518d\u5ea6\u8ee2\u7f6e\u3057\u3066\u5143\u306e\u5f62\u306b\u623b\u3059\n    return list(zip(*sorted_columns))\n\nresult = [list(row) for row in sort_columns(matrix)]\nprint(\"\u5217\u3054\u3068\u30bd\u30fc\u30c8\u5f8c:\")\nfor row in result:\n    print(row)\n<\/code><\/pre>\n<h2>2. \u884c\u5168\u4f53\u3092\u30bd\u30fc\u30c8\u30ad\u30fc\u3067\u4e26\u3073\u66ff\u3048<\/h2>\n<h3>\u7279\u5b9a\u306e\u5217\u3092\u57fa\u6e96\u306b\u3057\u305f\u884c\u306e\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\"># \u5b66\u751f\u30c7\u30fc\u30bf\u3092\u6210\u7e3e\u3067\u30bd\u30fc\u30c8\nstudents = [\n    [\"Alice\", 85, \"A\"],\n    [\"Bob\", 92, \"A+\"],\n    [\"Charlie\", 78, \"B\"],\n    [\"Diana\", 96, \"A+\"]\n]\n\n# 2\u5217\u76ee\uff08\u6210\u7e3e\uff09\u3067\u964d\u9806\u30bd\u30fc\u30c8\nsorted_by_score = sorted(students, key=lambda x: x[1], reverse=True)\nprint(\"\u6210\u7e3e\u9806\uff08\u964d\u9806\uff09:\")\nfor student in sorted_by_score:\n    print(student)\n# ['Diana', 96, 'A+']\n# ['Bob', 92, 'A+']\n# ['Alice', 85, 'A']\n# ['Charlie', 78, 'B']\n<\/code><\/pre>\n<h3>\u8907\u6570\u306e\u5217\u3092\u57fa\u6e96\u306b\u3057\u305f\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\"># \u8907\u6570\u6761\u4ef6\u3067\u306e\u30bd\u30fc\u30c8\ndata = [\n    [\"\u6771\u4eac\", \"\u55b6\u696d\", 85],\n    [\"\u5927\u962a\", \"\u958b\u767a\", 92],\n    [\"\u6771\u4eac\", \"\u958b\u767a\", 78],\n    [\"\u5927\u962a\", \"\u55b6\u696d\", 88],\n    [\"\u6771\u4eac\", \"\u55b6\u696d\", 91]\n]\n\n# 1. \u90fd\u5e02\u540d\uff08\u6607\u9806\uff09\u2192 2. \u90e8\u7f72\u540d\uff08\u6607\u9806\uff09\u2192 3. \u30b9\u30b3\u30a2\uff08\u964d\u9806\uff09\nsorted_data = sorted(data, key=lambda x: (x[0], x[1], -x[2]))\nprint(\"\u8907\u6570\u6761\u4ef6\u30bd\u30fc\u30c8:\")\nfor row in sorted_data:\n    print(row)\n<\/code><\/pre>\n<h2>3. \u6570\u5024\u30c7\u30fc\u30bf\u306e2\u6b21\u5143\u914d\u5217\u30bd\u30fc\u30c8<\/h2>\n<h3>\u884c\u306e\u5408\u8a08\u5024\u3067\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\"># \u5404\u884c\u306e\u5408\u8a08\u5024\u3067\u30bd\u30fc\u30c8\nnumbers = [\n    [1, 5, 3],\n    [8, 2, 1],\n    [4, 6, 2]\n]\n\nsorted_by_sum = sorted(numbers, key=sum)\nprint(\"\u884c\u306e\u5408\u8a08\u5024\u3067\u30bd\u30fc\u30c8:\")\nfor row in sorted_by_sum:\n    print(f\"{row} (\u5408\u8a08: {sum(row)})\")\n# [1, 5, 3] (\u5408\u8a08: 9)\n# [8, 2, 1] (\u5408\u8a08: 11)\n# [4, 6, 2] (\u5408\u8a08: 12)\n<\/code><\/pre>\n<h3>\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3067\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\"># \u5404\u884c\u306e\u6700\u5927\u5024\u3067\u30bd\u30fc\u30c8\ndata = [\n    [10, 3, 7],\n    [2, 9, 4],\n    [6, 1, 8]\n]\n\nsorted_by_max = sorted(data, key=max, reverse=True)\nprint(\"\u5404\u884c\u306e\u6700\u5927\u5024\u3067\u30bd\u30fc\u30c8\uff08\u964d\u9806\uff09:\")\nfor row in sorted_by_max:\n    print(f\"{row} (\u6700\u5927: {max(row)})\")\n\n# \u5404\u884c\u306e\u6700\u5c0f\u5024\u3067\u30bd\u30fc\u30c8\nsorted_by_min = sorted(data, key=min)\nprint(\"\u5404\u884c\u306e\u6700\u5c0f\u5024\u3067\u30bd\u30fc\u30c8\uff08\u6607\u9806\uff09:\")\nfor row in sorted_by_min:\n    print(f\"{row} (\u6700\u5c0f: {min(row)})\")\n<\/code><\/pre>\n<h2>4. \u6587\u5b57\u5217\u30c7\u30fc\u30bf\u306e2\u6b21\u5143\u914d\u5217\u30bd\u30fc\u30c8<\/h2>\n<h3>\u8f9e\u66f8\u9806\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\"># \u6587\u5b57\u5217\u30c7\u30fc\u30bf\u306e\u8f9e\u66f8\u9806\u30bd\u30fc\u30c8\nwords_matrix = [\n    [\"cat\", \"dog\", \"bird\"],\n    [\"apple\", \"banana\", \"cherry\"],\n    [\"zebra\", \"ant\", \"elephant\"]\n]\n\n# \u5404\u884c\u3092\u8f9e\u66f8\u9806\u30bd\u30fc\u30c8\nsorted_words = [sorted(row) for row in words_matrix]\nprint(\"\u5404\u884c\u3092\u8f9e\u66f8\u9806\u30bd\u30fc\u30c8:\")\nfor row in sorted_words:\n    print(row)\n\n# \u884c\u3092\u6700\u521d\u306e\u5358\u8a9e\u3067\u30bd\u30fc\u30c8\nsorted_by_first = sorted(words_matrix, key=lambda x: x[0])\nprint(\"\u6700\u521d\u306e\u5358\u8a9e\u3067\u30bd\u30fc\u30c8:\")\nfor row in sorted_by_first:\n    print(row)\n<\/code><\/pre>\n<h3>\u6587\u5b57\u5217\u9577\u3067\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\"># \u6587\u5b57\u5217\u306e\u9577\u3055\u3067\u30bd\u30fc\u30c8\ntext_data = [\n    [\"hello\", \"hi\", \"goodbye\"],\n    [\"python\", \"java\", \"c\"],\n    [\"programming\", \"code\", \"algorithm\"]\n]\n\n# \u5404\u884c\u306e\u6587\u5b57\u5217\u3092\u9577\u3055\u3067\u30bd\u30fc\u30c8\nsorted_by_length = [sorted(row, key=len) for row in text_data]\nprint(\"\u6587\u5b57\u5217\u9577\u3067\u30bd\u30fc\u30c8:\")\nfor row in sorted_by_length:\n    print(row)\n\n# \u884c\u3092\u6700\u9577\u6587\u5b57\u5217\u3067\u30bd\u30fc\u30c8\nsorted_by_max_length = sorted(text_data, key=lambda x: max(len(word) for word in x))\nprint(\"\u6700\u9577\u6587\u5b57\u5217\u3067\u30bd\u30fc\u30c8:\")\nfor row in sorted_by_max_length:\n    print(row)\n<\/code><\/pre>\n<h2>5. \u30ab\u30b9\u30bf\u30e0\u30bd\u30fc\u30c8\u95a2\u6570<\/h2>\n<h3>\u8907\u96d1\u306a\u6761\u4ef6\u3067\u306e\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\"># \u5546\u54c1\u30c7\u30fc\u30bf\u306e\u30ab\u30b9\u30bf\u30e0\u30bd\u30fc\u30c8\nproducts = [\n    [\"Laptop\", 80000, 4.5, \"Electronics\"],\n    [\"Book\", 1500, 4.8, \"Education\"], \n    [\"Phone\", 60000, 4.2, \"Electronics\"],\n    [\"Chair\", 25000, 4.0, \"Furniture\"]\n]\n\ndef custom_sort_key(product):\n    \"\"\"\u30ab\u30b9\u30bf\u30e0\u30bd\u30fc\u30c8\u30ad\u30fc\u95a2\u6570\"\"\"\n    name, price, rating, category = product\n    \n    # \u30ab\u30c6\u30b4\u30ea\u512a\u5148\u5ea6\n    category_priority = {\"Electronics\": 1, \"Education\": 2, \"Furniture\": 3}\n    \n    # (\u30ab\u30c6\u30b4\u30ea\u512a\u5148\u5ea6, -\u8a55\u4fa1, \u4fa1\u683c) \u306e\u9806\u3067\u30bd\u30fc\u30c8\n    return (category_priority.get(category, 999), -rating, price)\n\nsorted_products = sorted(products, key=custom_sort_key)\nprint(\"\u30ab\u30b9\u30bf\u30e0\u30bd\u30fc\u30c8\u7d50\u679c:\")\nfor product in sorted_products:\n    print(product)\n<\/code><\/pre>\n<h3>\u6761\u4ef6\u5206\u5c90\u3092\u542b\u3080\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\">def conditional_sort(data, sort_by_column, condition_func):\n    \"\"\"\u6761\u4ef6\u306b\u5fdc\u3058\u3066\u7570\u306a\u308b\u30bd\u30fc\u30c8\u3092\u9069\u7528\"\"\"\n    # \u6761\u4ef6\u306b\u5408\u3046\u884c\u3068\u5408\u308f\u306a\u3044\u884c\u3092\u5206\u96e2\n    matching = [row for row in data if condition_func(row)]\n    non_matching = [row for row in data if not condition_func(row)]\n    \n    # \u305d\u308c\u305e\u308c\u7570\u306a\u308b\u65b9\u6cd5\u3067\u30bd\u30fc\u30c8\n    matching_sorted = sorted(matching, key=lambda x: x[sort_by_column])\n    non_matching_sorted = sorted(non_matching, key=lambda x: x[sort_by_column], reverse=True)\n    \n    return matching_sorted + non_matching_sorted\n\n# \u4f7f\u7528\u4f8b\uff1a\u30b9\u30b3\u30a2\u304c80\u4ee5\u4e0a\u306f\u6607\u9806\u3001\u672a\u6e80\u306f\u964d\u9806\nscores = [\n    [\"Alice\", 85],\n    [\"Bob\", 92],\n    [\"Charlie\", 78],\n    [\"Diana\", 96],\n    [\"Eve\", 72]\n]\n\nresult = conditional_sort(scores, 1, lambda x: x[1] &gt;= 80)\nprint(\"\u6761\u4ef6\u5206\u5c90\u30bd\u30fc\u30c8:\")\nfor row in result:\n    print(row)\n<\/code><\/pre>\n<h2>6. \u30a4\u30f3\u30d7\u30ec\u30fc\u30b9\u30bd\u30fc\u30c8 vs \u65b0\u3057\u3044\u914d\u5217\u4f5c\u6210<\/h2>\n<h3>\u30a4\u30f3\u30d7\u30ec\u30fc\u30b9\u30bd\u30fc\u30c8\uff08\u5143\u306e\u914d\u5217\u3092\u5909\u66f4\uff09<\/h3>\n<pre><code class=\"language-python\"># \u5143\u306e\u914d\u5217\u3092\u76f4\u63a5\u5909\u66f4\nmatrix = [\n    [3, 1, 4],\n    [6, 2, 5], \n    [9, 7, 8]\n]\n\nprint(\"\u30bd\u30fc\u30c8\u524d:\", matrix)\n\n# \u5404\u884c\u3092\u30a4\u30f3\u30d7\u30ec\u30fc\u30b9\u30bd\u30fc\u30c8\nfor row in matrix:\n    row.sort()\n\nprint(\"\u30bd\u30fc\u30c8\u5f8c:\", matrix)\n\n# \u884c\u5168\u4f53\u3092\u30a4\u30f3\u30d7\u30ec\u30fc\u30b9\u30bd\u30fc\u30c8\nmatrix.sort(key=lambda x: x[0])  # \u6700\u521d\u306e\u8981\u7d20\u3067\u30bd\u30fc\u30c8\nprint(\"\u884c\u30bd\u30fc\u30c8\u5f8c:\", matrix)\n<\/code><\/pre>\n<h3>\u65b0\u3057\u3044\u914d\u5217\u3092\u4f5c\u6210\uff08\u5143\u306e\u914d\u5217\u306f\u4fdd\u6301\uff09<\/h3>\n<pre><code class=\"language-python\"># \u5143\u306e\u914d\u5217\u3092\u4fdd\u6301\u3057\u3064\u3064\u65b0\u3057\u3044\u30bd\u30fc\u30c8\u6e08\u307f\u914d\u5217\u3092\u4f5c\u6210\noriginal = [\n    [3, 1, 4],\n    [6, 2, 5],\n    [9, 7, 8]\n]\n\n# \u65b0\u3057\u3044\u914d\u5217\u3092\u4f5c\u6210\nrow_sorted = [sorted(row) for row in original]\ncolumn_sorted = sorted(original, key=lambda x: x[1])  # 2\u5217\u76ee\u3067\u30bd\u30fc\u30c8\n\nprint(\"\u5143\u306e\u914d\u5217:\", original)\nprint(\"\u884c\u30bd\u30fc\u30c8\u6e08\u307f:\", row_sorted)\nprint(\"\u5217\u30bd\u30fc\u30c8\u6e08\u307f:\", column_sorted)\n<\/code><\/pre>\n<h2>7. NumPy\u3068\u306e\u6bd4\u8f03\uff08\u53c2\u8003\uff09<\/h2>\n<h3>\u7d14\u7c8bPython\u3067\u306e\u5b9f\u88c5<\/h3>\n<pre><code class=\"language-python\"># \u7d14\u7c8bPython\u306b\u3088\u308b2\u6b21\u5143\u914d\u5217\u30bd\u30fc\u30c8\ndef python_2d_sort(matrix, axis=0, key_column=0):\n    \"\"\"\n    \u7d14\u7c8bPython\u306b\u3088\u308b2\u6b21\u5143\u914d\u5217\u30bd\u30fc\u30c8\n    axis=0: \u884c\u3092\u30bd\u30fc\u30c8, axis=1: \u5404\u884c\u5185\u3092\u30bd\u30fc\u30c8\n    \"\"\"\n    if axis == 0:\n        # \u884c\u3092\u30bd\u30fc\u30c8\uff08\u6307\u5b9a\u5217\u3092\u57fa\u6e96\uff09\n        return sorted(matrix, key=lambda x: x[key_column])\n    elif axis == 1:\n        # \u5404\u884c\u5185\u3092\u30bd\u30fc\u30c8\n        return [sorted(row) for row in matrix]\n\ndata = [[3, 1, 4], [6, 2, 5], [9, 7, 8]]\n\nprint(\"\u884c\u30bd\u30fc\u30c8\uff081\u5217\u76ee\u57fa\u6e96\uff09:\")\nresult1 = python_2d_sort(data, axis=0, key_column=1)\nfor row in result1:\n    print(row)\n\nprint(\"\u5404\u884c\u5185\u30bd\u30fc\u30c8:\")\nresult2 = python_2d_sort(data, axis=1)\nfor row in result2:\n    print(row)\n<\/code><\/pre>\n<h2>8. \u5927\u898f\u6a21\u30c7\u30fc\u30bf\u3067\u306e\u52b9\u7387\u7684\u30bd\u30fc\u30c8<\/h2>\n<h3>\u30e1\u30e2\u30ea\u52b9\u7387\u3092\u8003\u616e\u3057\u305f\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\">def memory_efficient_sort(large_matrix, key_func, chunk_size=1000):\n    \"\"\"\u30e1\u30e2\u30ea\u52b9\u7387\u7684\u306a\u5927\u898f\u6a212\u6b21\u5143\u914d\u5217\u30bd\u30fc\u30c8\"\"\"\n    # \u30c1\u30e3\u30f3\u30af\u5358\u4f4d\u3067\u51e6\u7406\n    sorted_chunks = []\n    \n    for i in range(0, len(large_matrix), chunk_size):\n        chunk = large_matrix[i:i + chunk_size]\n        sorted_chunk = sorted(chunk, key=key_func)\n        sorted_chunks.append(sorted_chunk)\n    \n    # \u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u7684\u306b\u30c1\u30e3\u30f3\u30af\u3092\u7d50\u5408\n    result = []\n    for chunk in sorted_chunks:\n        result.extend(chunk)\n    \n    # \u6700\u7d42\u30bd\u30fc\u30c8\n    return sorted(result, key=key_func)\n\n# \u4f7f\u7528\u4f8b\uff08\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\uff09\nlarge_data = [[i, i*2, i*3] for i in range(10000, 0, -1)]\nsorted_data = memory_efficient_sort(large_data, key=lambda x: x[1], chunk_size=2000)\nprint(f\"\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u30bd\u30fc\u30c8\u5b8c\u4e86: {len(sorted_data)}\u884c\")\nprint(f\"\u6700\u521d\u306e5\u884c: {sorted_data[:5]}\")\n<\/code><\/pre>\n<h2>9. \u5b9f\u7528\u7684\u306a\u5fdc\u7528\u4f8b<\/h2>\n<h3>CSV\u30e9\u30a4\u30af\u306a\u30c7\u30fc\u30bf\u306e\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\"># CSV\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u30bd\u30fc\u30c8\ncsv_data = [\n    [\"\u540d\u524d\", \"\u5e74\u9f62\", \"\u90e8\u7f72\", \"\u7d66\u4e0e\"],  # \u30d8\u30c3\u30c0\u30fc\n    [\"\u7530\u4e2d\", 28, \"\u55b6\u696d\", 400000],\n    [\"\u4f50\u85e4\", 35, \"\u958b\u767a\", 550000],\n    [\"\u9234\u6728\", 42, \"\u55b6\u696d\", 480000],\n    [\"\u9ad8\u6a4b\", 31, \"\u958b\u767a\", 520000]\n]\n\ndef sort_csv_data(data, sort_column, reverse=False, has_header=True):\n    \"\"\"CSV\u5f62\u5f0f\u30c7\u30fc\u30bf\u306e\u30bd\u30fc\u30c8\"\"\"\n    if has_header:\n        header = data[0]\n        body = data[1:]\n    else:\n        header = None\n        body = data\n    \n    # \u5217\u540d\u307e\u305f\u306f\u5217\u756a\u53f7\u3092\u89e3\u6c7a\n    if isinstance(sort_column, str):\n        if header is None:\n            raise ValueError(\"\u30d8\u30c3\u30c0\u30fc\u304c\u3042\u308a\u307e\u305b\u3093\")\n        column_index = header.index(sort_column)\n    else:\n        column_index = sort_column\n    \n    # \u30bd\u30fc\u30c8\u5b9f\u884c\n    sorted_body = sorted(body, key=lambda x: x[column_index], reverse=reverse)\n    \n    # \u7d50\u679c\u3092\u69cb\u7bc9\n    if header is not None:\n        return [header] + sorted_body\n    return sorted_body\n\n# \u7d66\u4e0e\u3067\u30bd\u30fc\u30c8\nsorted_by_salary = sort_csv_data(csv_data, \"\u7d66\u4e0e\", reverse=True)\nprint(\"\u7d66\u4e0e\u9806\uff08\u964d\u9806\uff09:\")\nfor row in sorted_by_salary:\n    print(row)\n<\/code><\/pre>\n<h3>\u6210\u7e3e\u8868\u306e\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\">class GradeBook:\n    def __init__(self):\n        self.grades = [\n            [\"\u5b66\u751f\u540d\", \"\u6570\u5b66\", \"\u82f1\u8a9e\", \"\u7406\u79d1\", \"\u5e73\u5747\"],\n            [\"\u5c71\u7530\", 85, 78, 92, 0],\n            [\"\u7530\u4e2d\", 92, 88, 85, 0],\n            [\"\u4f50\u85e4\", 78, 95, 89, 0],\n            [\"\u9234\u6728\", 88, 82, 78, 0]\n        ]\n        self.calculate_averages()\n    \n    def calculate_averages(self):\n        \"\"\"\u5e73\u5747\u70b9\u3092\u8a08\u7b97\"\"\"\n        for i in range(1, len(self.grades)):\n            math, english, science = self.grades[i][1:4]\n            average = round((math + english + science) \/ 3, 1)\n            self.grades[i][4] = average\n    \n    def sort_by_subject(self, subject):\n        \"\"\"\u79d1\u76ee\u5225\u30bd\u30fc\u30c8\"\"\"\n        header = self.grades[0]\n        if subject not in header:\n            return None\n        \n        column_index = header.index(subject)\n        body = self.grades[1:]\n        sorted_body = sorted(body, key=lambda x: x[column_index], reverse=True)\n        \n        return [header] + sorted_body\n    \n    def get_ranking(self):\n        \"\"\"\u7dcf\u5408\u30e9\u30f3\u30ad\u30f3\u30b0\u3092\u53d6\u5f97\"\"\"\n        ranked = self.sort_by_subject(\"\u5e73\u5747\")\n        for i, row in enumerate(ranked[1:], 1):\n            row.append(f\"{i}\u4f4d\")\n        return ranked\n\n# \u4f7f\u7528\u4f8b\ngradebook = GradeBook()\nranking = gradebook.get_ranking()\n\nprint(\"\u6210\u7e3e\u30e9\u30f3\u30ad\u30f3\u30b0:\")\nfor row in ranking:\n    print(row)\n<\/code><\/pre>\n<h2>10. \u7279\u6b8a\u306a\u30bd\u30fc\u30c8\u30d1\u30bf\u30fc\u30f3<\/h2>\n<h3>\u30b8\u30b0\u30b6\u30b0\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\">def zigzag_sort(matrix):\n    \"\"\"\u30b8\u30b0\u30b6\u30b0\u30d1\u30bf\u30fc\u30f3\u3067\u306e\u30bd\u30fc\u30c8\"\"\"\n    result = []\n    for i, row in enumerate(matrix):\n        if i % 2 == 0:\n            # \u5076\u6570\u884c\u306f\u6607\u9806\n            result.append(sorted(row))\n        else:\n            # \u5947\u6570\u884c\u306f\u964d\u9806\n            result.append(sorted(row, reverse=True))\n    return result\n\ndata = [\n    [5, 2, 8, 1],\n    [9, 3, 6, 4],\n    [7, 1, 9, 2],\n    [4, 6, 3, 8]\n]\n\nzigzag = zigzag_sort(data)\nprint(\"\u30b8\u30b0\u30b6\u30b0\u30bd\u30fc\u30c8:\")\nfor i, row in enumerate(zigzag):\n    print(f\"\u884c{i}: {row}\")\n<\/code><\/pre>\n<h3>\u87ba\u65cb\u72b6\u30bd\u30fc\u30c8<\/h3>\n<pre><code class=\"language-python\">def spiral_sort(matrix):\n    \"\"\"\u87ba\u65cb\u72b6\u306b\u30bd\u30fc\u30c8\u3055\u308c\u305f\u5024\u3092\u914d\u7f6e\"\"\"\n    # \u5168\u8981\u7d20\u3092\u53d6\u5f97\u3057\u3066\u30bd\u30fc\u30c8\n    all_elements = []\n    for row in matrix:\n        all_elements.extend(row)\n    all_elements.sort()\n    \n    # \u87ba\u65cb\u72b6\u306b\u914d\u7f6e\n    rows, cols = len(matrix), len(matrix[0])\n    result = [[0] * cols for _ in range(rows)]\n    \n    top, bottom = 0, rows - 1\n    left, right = 0, cols - 1\n    index = 0\n    \n    while top &lt;= bottom and left &lt;= right:\n        # \u4e0a\u8fba\u3092\u5de6\u304b\u3089\u53f3\u3078\n        for j in range(left, right + 1):\n            result[top][j] = all_elements[index]\n            index += 1\n        top += 1\n        \n        # \u53f3\u8fba\u3092\u4e0a\u304b\u3089\u4e0b\u3078\n        for i in range(top, bottom + 1):\n            result[i][right] = all_elements[index]\n            index += 1\n        right -= 1\n        \n        # \u4e0b\u8fba\u3092\u53f3\u304b\u3089\u5de6\u3078\n        if top &lt;= bottom:\n            for j in range(right, left - 1, -1):\n                result[bottom][j] = all_elements[index]\n                index += 1\n            bottom -= 1\n        \n        # \u5de6\u8fba\u3092\u4e0b\u304b\u3089\u4e0a\u3078\n        if left &lt;= right:\n            for i in range(bottom, top - 1, -1):\n                result[i][left] = all_elements[index]\n                index += 1\n            left += 1\n    \n    return result\n\n# \u4f7f\u7528\u4f8b\noriginal = [\n    [9, 2, 7],\n    [4, 1, 8],\n    [5, 6, 3]\n]\n\nspiral = spiral_sort(original)\nprint(\"\u87ba\u65cb\u72b6\u30bd\u30fc\u30c8:\")\nfor row in spiral:\n    print(row)\n<\/code><\/pre>\n<h2>11. \u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3068\u5b89\u5168\u306a\u30bd\u30fc\u30c8<\/h2>\n<h3>\u5b89\u5168\u306a\u30bd\u30fc\u30c8\u95a2\u6570<\/h3>\n<pre><code class=\"language-python\">def safe_2d_sort(matrix, sort_key=None, reverse=False):\n    \"\"\"\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3092\u542b\u3080\u5b89\u5168\u306a2\u6b21\u5143\u914d\u5217\u30bd\u30fc\u30c8\"\"\"\n    try:\n        # \u5165\u529b\u691c\u8a3c\n        if not matrix:\n            return []\n        \n        if not all(isinstance(row, (list, tuple)) for row in matrix):\n            raise TypeError(\"\u5168\u3066\u306e\u884c\u304c\u30ea\u30b9\u30c8\u307e\u305f\u306f\u30bf\u30d7\u30eb\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\")\n        \n        # \u7a7a\u306e\u884c\u3092\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\n        non_empty_rows = [row for row in matrix if row]\n        \n        if not non_empty_rows:\n            return matrix\n        \n        # \u30bd\u30fc\u30c8\u30ad\u30fc\u306e\u691c\u8a3c\n        if sort_key is not None:\n            if callable(sort_key):\n                # \u95a2\u6570\u306e\u5834\u5408\u306f\u305d\u306e\u307e\u307e\u4f7f\u7528\n                key_func = sort_key\n            elif isinstance(sort_key, int):\n                # \u6574\u6570\u306e\u5834\u5408\u306f\u5217\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\n                max_columns = max(len(row) for row in non_empty_rows)\n                if sort_key &gt;= max_columns:\n                    raise IndexError(f\"\u5217\u30a4\u30f3\u30c7\u30c3\u30af\u30b9 {sort_key} \u304c\u7bc4\u56f2\u5916\u3067\u3059\")\n                key_func = lambda x: x[sort_key] if len(x) &gt; sort_key else None\n            else:\n                raise ValueError(\"sort_key\u306f\u95a2\u6570\u307e\u305f\u306f\u6574\u6570\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\")\n        else:\n            key_func = None\n        \n        # \u30bd\u30fc\u30c8\u5b9f\u884c\n        sorted_rows = sorted(non_empty_rows, key=key_func, reverse=reverse)\n        \n        # \u7a7a\u306e\u884c\u3092\u5143\u306e\u4f4d\u7f6e\u306b\u623b\u3059\n        result = []\n        empty_positions = [i for i, row in enumerate(matrix) if not row]\n        sorted_index = 0\n        \n        for i in range(len(matrix)):\n            if i in empty_positions:\n                result.append(matrix[i])\n            else:\n                result.append(sorted_rows[sorted_index])\n                sorted_index += 1\n        \n        return result\n        \n    except Exception as e:\n        print(f\"\u30bd\u30fc\u30c8\u30a8\u30e9\u30fc: {e}\")\n        return matrix\n\n# \u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\ntest_cases = [\n    [[3, 1, 4], [6, 2, 5], [9, 7, 8]],  # \u6b63\u5e38\n    [[1, 2], [], [3, 4, 5]],             # \u7a7a\u884c\u3092\u542b\u3080\n    [],                                   # \u7a7a\u306e\u914d\u5217\n    [[\"a\", \"b\"], [\"c\", \"d\"]]             # \u6587\u5b57\u5217\n]\n\nfor i, case in enumerate(test_cases):\n    print(f\"\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9 {i + 1}:\")\n    result = safe_2d_sort(case, sort_key=0)\n    print(f\"\u7d50\u679c: {result}\\n\")\n<\/code><\/pre>\n<h2>12. \u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316<\/h2>\n<h3>\u30bd\u30fc\u30c8\u624b\u6cd5\u306e\u6bd4\u8f03<\/h3>\n<pre><code class=\"language-python\">import time\nimport random\n\ndef benchmark_2d_sorts(size=1000):\n    \"\"\"2\u6b21\u5143\u914d\u5217\u30bd\u30fc\u30c8\u624b\u6cd5\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6bd4\u8f03\"\"\"\n    \n    # \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u751f\u6210\n    test_data = [[random.randint(1, 1000) for _ in range(3)] \n                 for _ in range(size)]\n    \n    methods = {\n        \"sorted()\": lambda data: sorted(data, key=lambda x: x[0]),\n        \"list.sort()\": lambda data: data.sort(key=lambda x: x[0]) or data,\n        \"custom_key\": lambda data: sorted(data, key=lambda x: (x[0], x[1])),\n        \"multiple_sorts\": lambda data: sorted(sorted(data, key=lambda x: x[1]), \n                                           key=lambda x: x[0])\n    }\n    \n    results = {}\n    for name, method in methods.items():\n        test_copy = [row[:] for row in test_data]  # \u30c7\u30a3\u30fc\u30d7\u30b3\u30d4\u30fc\n        \n        start_time = time.time()\n        method(test_copy)\n        end_time = time.time()\n        \n        results[name] = end_time - start_time\n    \n    print(f\"\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba: {size}\u884c\")\n    for method, time_taken in sorted(results.items(), key=lambda x: x[1]):\n        print(f\"{method:15}: {time_taken:.4f}\u79d2\")\n\nbenchmark_2d_sorts(5000)\n<\/code><\/pre>\n<h2>13. \u5b9f\u4e16\u754c\u3067\u306e\u5fdc\u7528\u4f8b<\/h2>\n<h3>\u58f2\u4e0a\u30c7\u30fc\u30bf\u306e\u5206\u6790<\/h3>\n<pre><code class=\"language-python\">class SalesAnalyzer:\n    def __init__(self, sales_data):\n        self.data = sales_data  # [\u65e5\u4ed8, \u5546\u54c1, \u58f2\u4e0a, \u5730\u57df]\n    \n    def sort_by_date(self):\n        \"\"\"\u65e5\u4ed8\u9806\u30bd\u30fc\u30c8\"\"\"\n        return sorted(self.data, key=lambda x: x[0])\n    \n    def sort_by_sales(self, reverse=True):\n        \"\"\"\u58f2\u4e0a\u9806\u30bd\u30fc\u30c8\"\"\"\n        return sorted(self.data, key=lambda x: x[2], reverse=reverse)\n    \n    def sort_by_region_and_sales(self):\n        \"\"\"\u5730\u57df\u5225\u2192\u58f2\u4e0a\u9806\u30bd\u30fc\u30c8\"\"\"\n        return sorted(self.data, key=lambda x: (x[3], -x[2]))\n    \n    def get_top_products(self, n=5):\n        \"\"\"\u58f2\u4e0a\u4e0a\u4f4d\u5546\u54c1\"\"\"\n        sorted_data = self.sort_by_sales()\n        return sorted_data[:n]\n\n# \u4f7f\u7528\u4f8b\nsales_data = [\n    [\"2024-01-15\", \"\u5546\u54c1A\", 150000, \"\u6771\u4eac\"],\n    [\"2024-01-16\", \"\u5546\u54c1B\", 200000, \"\u5927\u962a\"],\n    [\"2024-01-14\", \"\u5546\u54c1C\", 180000, \"\u6771\u4eac\"],\n    [\"2024-01-17\", \"\u5546\u54c1A\", 160000, \"\u540d\u53e4\u5c4b\"],\n    [\"2024-01-15\", \"\u5546\u54c1D\", 220000, \"\u5927\u962a\"]\n]\n\nanalyzer = SalesAnalyzer(sales_data)\n\nprint(\"\u58f2\u4e0a\u4e0a\u4f4d3\u5546\u54c1:\")\ntop_products = analyzer.get_top_products(3)\nfor product in top_products:\n    print(f\"{product[1]}: {product[2]:,}\u5186 ({product[3]})\")\n\nprint(\"\\n\u5730\u57df\u5225\u58f2\u4e0a\u9806:\")\nregional_sales = analyzer.sort_by_region_and_sales()\nfor sale in regional_sales:\n    print(f\"{sale[3]} - {sale[1]}: {sale[2]:,}\u5186\")\n<\/code><\/pre>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Python \u306e2\u6b21\u5143\u914d\u5217\uff08\u30ea\u30b9\u30c8\u306e\u30ea\u30b9\u30c8\uff09\u30bd\u30fc\u30c8\u306b\u306f\u3001\u7528\u9014\u306b\u5fdc\u3058\u3066\u69d8\u3005\u306a\u624b\u6cd5\u304c\u3042\u308a\u307e\u3059\uff1a<\/p>\n<h3>\u57fa\u672c\u7684\u306a\u30bd\u30fc\u30c8\u624b\u6cd5<\/h3>\n<ol>\n<li><strong>\u884c\u3054\u3068\u306e\u30bd\u30fc\u30c8<\/strong> &#8211; <code>[sorted(row) for row in matrix]<\/code><\/li>\n<li><strong>\u5217\u3067\u306e\u30bd\u30fc\u30c8<\/strong> &#8211; <code>sorted(matrix, key=lambda x: x[\u5217\u756a\u53f7])<\/code><\/li>\n<li><strong>\u8907\u6570\u6761\u4ef6\u30bd\u30fc\u30c8<\/strong> &#8211; <code>sorted(matrix, key=lambda x: (x[0], x[1]))<\/code><\/li>\n<\/ol>\n<h3>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u7279\u6027<\/h3>\n<ul>\n<li><strong>\u901f\u5ea6<\/strong>: <code>list.sort()<\/code> &gt; <code>sorted()<\/code> &gt; \u30ab\u30b9\u30bf\u30e0\u30ad\u30fc\u95a2\u6570<\/li>\n<li><strong>\u30e1\u30e2\u30ea<\/strong>: \u30a4\u30f3\u30d7\u30ec\u30fc\u30b9\u30bd\u30fc\u30c8 &gt; \u65b0\u898f\u4f5c\u6210<\/li>\n<li><strong>\u67d4\u8edf\u6027<\/strong>: \u30ab\u30b9\u30bf\u30e0\u30ad\u30fc &gt; \u6a19\u6e96\u30bd\u30fc\u30c8<\/li>\n<\/ul>\n<h3>\u63a8\u5968\u7528\u9014<\/h3>\n<ul>\n<li><strong>\u30c7\u30fc\u30bf\u5206\u6790<\/strong>: \u8907\u6570\u6761\u4ef6\u306b\u3088\u308b\u30bd\u30fc\u30c8<\/li>\n<li><strong>\u884c\u5217\u8a08\u7b97<\/strong>: \u6570\u5024\u30d9\u30fc\u30b9\u306e\u30bd\u30fc\u30c8<\/li>\n<li><strong>\u30c6\u30fc\u30d6\u30eb\u51e6\u7406<\/strong>: CSV\u30e9\u30a4\u30af\u306a\u30c7\u30fc\u30bf\u306e\u30bd\u30fc\u30c8<\/li>\n<li><strong>\u30b2\u30fc\u30e0\u958b\u767a<\/strong>: \u30b9\u30b3\u30a2\u30e9\u30f3\u30ad\u30f3\u30b0\u3001\u5ea7\u6a19\u30bd\u30fc\u30c8<\/li>\n<\/ul>\n<p>\u9069\u5207\u306a\u624b\u6cd5\u3092\u9078\u629e\u3057\u3001\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3084\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3082\u8003\u616e\u3059\u308b\u3053\u3068\u3067\u3001\u52b9\u7387\u7684\u3067\u4fdd\u5b88\u6027\u306e\u9ad8\u30442\u6b21\u5143\u914d\u5217\u51e6\u7406\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002\u7279\u306b\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u3092\u6271\u3046\u5834\u5408\u306f\u3001\u30e1\u30e2\u30ea\u52b9\u7387\u3068\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u91cd\u8996\u3057\u305f\u5b9f\u88c5\u304c\u91cd\u8981\u306b\u306a\u308a\u307e\u3059\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=\"pQEDTZSIxL\"><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=2C8PpJ1qn9#?secret=pQEDTZSIxL\" data-secret=\"pQEDTZSIxL\" 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=\"gpYFn7t2d2\"><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=4NEVnw9qDl#?secret=gpYFn7t2d2\" data-secret=\"gpYFn7t2d2\" 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=\"GSSEQIp2FT\"><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=txMjuICCJu#?secret=GSSEQIp2FT\" data-secret=\"GSSEQIp2FT\" 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=\"4Z5s2CoMeQ\"><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=MUd3BrfWUa#?secret=4Z5s2CoMeQ\" data-secret=\"4Z5s2CoMeQ\" 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=\"T0b9x2Fhi8\"><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=7rnoGu5ze5#?secret=T0b9x2Fhi8\" data-secret=\"T0b9x2Fhi8\" 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=\"gnruLQcimN\"><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=A5lbKrnaS9#?secret=gnruLQcimN\" data-secret=\"gnruLQcimN\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Python \u30672\u6b21\u5143\u914d\u5217\uff08\u30ea\u30b9\u30c8\u306e\u30ea\u30b9\u30c8\uff09\u3092\u30bd\u30fc\u30c8\u3059\u308b\u3053\u3068\u306f\u3001\u30c7\u30fc\u30bf\u5206\u6790\u3001\u884c\u5217\u64cd\u4f5c\u3001\u30c6\u30fc\u30d6\u30eb\u30c7\u30fc\u30bf\u306e\u51e6\u7406\u306b\u304a\u3044\u3066\u983b\u7e41\u306b\u5fc5\u8981\u3068\u306a\u308b\u64cd\u4f5c\u3067\u3059\u3002\u5358\u7d14\u306a\u6570\u5024\u306e\u4e26\u3073\u66ff\u3048\u304b\u3089\u3001\u8907\u6570\u306e\u6761\u4ef6\u306b\u3088\u308b\u8907\u96d1\u306a\u30bd\u30fc\u30c8\u307e\u3067\u3001\u69d8\u3005\u306a\u624b\u6cd5\u304c\u3042\u308a\u307e\u3059 [&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-43878","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-column"],"views":102,"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\/43878","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=43878"}],"version-history":[{"count":0,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/posts\/43878\/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=43878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/categories?post=43878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techgym.jp\/wp-json\/wp\/v2\/tags?post=43878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}