{"id":15675,"date":"2026-07-15T02:41:05","date_gmt":"2026-07-14T17:41:05","guid":{"rendered":"https:\/\/genai-ai.co.jp\/ai-kanri\/?p=15675"},"modified":"2026-07-15T02:41:05","modified_gmt":"2026-07-14T17:41:05","slug":"cc-python-string-compare","status":"publish","type":"post","link":"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-python-string-compare\/","title":{"rendered":"\u30102026\u5e747\u6708\u6700\u65b0\u3011Python\u6587\u5b57\u5217\u306e\u6bd4\u8f03\u65b9\u6cd5\u307e\u3068\u3081\uff5c==\u30fbis\u30fbin\u30fb\u6b63\u898f\u8868\u73fe\u306e\u5b8c\u5168\u30ac\u30a4\u30c9\u3068Claude Code\u3067\u52b9\u7387\u5316\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"\n<style>\n.g-flow-row{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;align-items:center;}\n.g-flow-item{background:linear-gradient(135deg,#1a1a1a,#2a1015);color:#fff;border-radius:8px;padding:16px 14px;min-width:130px;flex:1;text-align:center;}\n.g-flow-arrow{color:#dc2626;font-size:20px;font-weight:700;}\n.g-card-row{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 32px;}\n.g-card-row>div{flex:1;min-width:220px;}\n@media(max-width:600px){\n  .g-flow-row{flex-direction:column;}\n  .g-flow-arrow{transform:rotate(90deg);}\n  .g-card-row{flex-direction:column;}\n  .g-card-row>div{min-width:100%;}\n}\n<\/style>\n\n\n\n<div style=\"margin:0 0 32px;\">\n  <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/07\/thumb-cc-python-string-compare.jpg\" alt=\"\u30102026\u5e747\u6708\u6700\u65b0\u3011Python\u6587\u5b57\u5217\u306e\u6bd4\u8f03\u65b9\u6cd5\u307e\u3068\u3081\uff5c==\u30fbis\u30fbin\u30fb\u6b63\u898f\u8868\u73fe\u306e\u5b8c\u5168\u30ac\u30a4\u30c9\u3068Claude Code\u3067\u52b9\u7387\u5316\u3059\u308b\u65b9\u6cd5\" style=\"width:100%;height:auto;border-radius:12px;display:block;\">\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-radius:12px;padding:24px 28px;margin:0 0 32px;border-left:4px solid #dc2626;\">\n  <p style=\"font-size:15px;font-weight:700;color:#1a1a1a;margin:0 0 16px;\">\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9<\/p>\n  <ol style=\"margin:0;padding-left:20px;font-size:14px;line-height:2.2;list-style:none;\">\n    <li><a href=\"#sec-01\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">01<\/span>Python\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u57fa\u790e\uff08==\u30fb!=\u6f14\u7b97\u5b50\uff09<\/a><\/li>\n    <li><a href=\"#sec-02\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">02<\/span>is\u6f14\u7b97\u5b50\u3068\u306f\u4f55\u304b\u30fb==\u3068\u306e\u6c7a\u5b9a\u7684\u306a\u9055\u3044<\/a><\/li>\n    <li><a href=\"#sec-03\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">03<\/span>in\u6f14\u7b97\u5b50\u306b\u3088\u308b\u90e8\u5206\u4e00\u81f4\u691c\u7d22<\/a><\/li>\n    <li><a href=\"#sec-04\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">04<\/span>\u6b63\u898f\u8868\u73fe\uff08re\u30e2\u30b8\u30e5\u30fc\u30eb\uff09\u306b\u3088\u308b\u9ad8\u5ea6\u306a\u6bd4\u8f03<\/a><\/li>\n    <li><a href=\"#sec-05\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">05<\/span>\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3057\u305f\u6bd4\u8f03\uff08lower\/casefold\uff09<\/a><\/li>\n    <li><a href=\"#sec-06\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">06<\/span>\u65e5\u672c\u8a9e\u6587\u5b57\u5217\u30fb\u30de\u30eb\u30c1\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u6bd4\u8f03<\/a><\/li>\n    <li><a href=\"#sec-07\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">07<\/span>\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3068\u3088\u304f\u3042\u308b\u30df\u30b9<\/a><\/li>\n    <li><a href=\"#sec-08\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">08<\/span>\u3010Claude Code\u6d3b\u7528\u3011\u6587\u5b57\u5217\u51e6\u7406\u30b3\u30fc\u30c9\u306e\u81ea\u52d5\u751f\u6210<\/a><\/li>\n    <li><a href=\"#sec-09\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">09<\/span>GENAI\u5b9f\u904b\u7528\u30c7\u30fc\u30bf<\/a><\/li>\n    <li><a href=\"#sec-10\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">\u307e\u3068\u3081<\/span>Python\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u9078\u3073\u65b9\u307e\u3068\u3081<\/a><\/li>\n    <li><a href=\"#faq\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#dc2626;font-weight:700;margin-right:8px;\">FAQ<\/span>\u3088\u304f\u3042\u308b\u8cea\u554f<\/a><\/li>\n  <\/ol>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u300cPython\u3067\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3057\u305f\u3044\u3051\u3069\u3001<strong>==\u3068is\u306f\u3069\u3046\u9055\u3046\u306e\uff1f<\/strong>\u300d\u300c<strong>\u90e8\u5206\u4e00\u81f4\u3092\u8abf\u3079\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\uff1f<\/strong>\u300d\u300c<strong>\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3057\u3066\u6bd4\u8f03\u3057\u305f\u3044<\/strong>\u300d\u2014\u2014\u3053\u306e\u30da\u30fc\u30b8\u306b\u6765\u305f\u65b9\u306f\u3001\u3053\u3093\u306a\u7591\u554f\u3092\u6301\u3063\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Python\u306b\u306f\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3059\u308b\u305f\u3081\u306e\u65b9\u6cd5\u304c\u8907\u6570\u3042\u308a\u307e\u3059\u3002<strong>==\u6f14\u7b97\u5b50\u306b\u3088\u308b\u5b8c\u5168\u4e00\u81f4<\/strong>\u3001<strong>is\u6f14\u7b97\u5b50\u306b\u3088\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u540c\u4e00\u6027\u306e\u78ba\u8a8d<\/strong>\u3001<strong>in\u6f14\u7b97\u5b50\u3092\u4f7f\u3063\u305f\u90e8\u5206\u4e00\u81f4<\/strong>\u3001\u305d\u3057\u3066<strong>re\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3063\u305f\u6b63\u898f\u8868\u73fe\u306b\u3088\u308b\u9ad8\u5ea6\u306a\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0<\/strong>\u307e\u3067\u3001\u76ee\u7684\u306b\u3088\u3063\u3066\u4f7f\u3044\u5206\u3051\u304c\u5fc5\u8981\u3067\u3059\u3002\u3053\u308c\u3089\u3092\u6b63\u3057\u304f\u7406\u89e3\u3057\u3066\u3044\u306a\u3044\u3068\u3001\u4e00\u898b\u52d5\u3044\u3066\u3044\u308b\u3088\u3046\u306b\u898b\u3048\u3066\u5b9f\u306f\u610f\u56f3\u3057\u306a\u3044\u52d5\u4f5c\u3092\u3059\u308b\u30d0\u30b0\u3092\u57cb\u3081\u8fbc\u3093\u3067\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Python\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u5168\u30d1\u30bf\u30fc\u30f3\u3092\u4f53\u7cfb\u7684\u306b\u89e3\u8aac\u3057\u3001\u305d\u308c\u305e\u308c\u306e<strong>\u4f7f\u3044\u3069\u3053\u308d\u30fb\u6ce8\u610f\u70b9\u30fb\u843d\u3068\u3057\u7a74<\/strong>\u307e\u3067\u30ab\u30d0\u30fc\u3057\u307e\u3059\u3002\u3055\u3089\u306b\u5f8c\u534a\u3067\u306f\u3001<strong>Claude Code\u3092\u4f7f\u3063\u3066\u6587\u5b57\u5217\u51e6\u7406\u30b3\u30fc\u30c9\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b\u65b9\u6cd5<\/strong>\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u91cf\u3092\u6e1b\u3089\u3057\u306a\u304c\u3089\u3001\u54c1\u8cea\u306e\u9ad8\u3044\u6587\u5b57\u5217\u51e6\u7406\u3092\u5b9f\u88c5\u3057\u305f\u3044\u65b9\u306b\u3068\u3063\u3066\u6709\u76ca\u306a\u5185\u5bb9\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u6587\u5b57\u5217\u6bd4\u8f03\u306fPython\u306e\u4e2d\u3067\u3082\u300c\u5206\u304b\u3063\u305f\u6c17\u306b\u306a\u308a\u3084\u3059\u3044\u3051\u3069\u3001\u5b9f\u306f\u843d\u3068\u3057\u7a74\u304c\u591a\u3044\u300d\u9818\u57df\u3067\u3059\u3002\u7279\u306bis\u3068==\u306e\u6df7\u540c\u306f\u3001\u73fe\u5834\u3067\u3082\u610f\u5916\u3068\u591a\u3044\u30d0\u30b0\u306e\u539f\u56e0\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u3057\u3063\u304b\u308a\u6574\u7406\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/div>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u5f8c\u534a\u306eClaude Code\u6d3b\u7528\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u6587\u5b57\u5217\u51e6\u7406\u306e\u8907\u96d1\u306a\u30ed\u30b8\u30c3\u30af\u3092\u81ea\u7136\u8a00\u8a9e\u3067\u6307\u793a\u3059\u308b\u3060\u3051\u3067\u30b3\u30fc\u30c9\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\u6b63\u898f\u8868\u73fe\u306e\u3088\u3046\u306a\u66f8\u304d\u65b9\u304c\u96e3\u3057\u3044\u30d1\u30bf\u30fc\u30f3\u3067\u3082\u3001Claude Code\u306b\u4efb\u305b\u308b\u3068\u4e00\u767a\u3067\u52d5\u304f\u30b3\u30fc\u30c9\u304c\u51fa\u3066\u304f\u308b\u306e\u306f\u611f\u52d5\u7684\u3067\u3059\u3002<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3080\u3068\u3001\u6b21\u306e7\u3064\u304c\u660e\u78ba\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>==\u30fb!=\u6f14\u7b97\u5b50<\/strong>\u306b\u3088\u308b\u6587\u5b57\u5217\u306e\u5b8c\u5168\u4e00\u81f4\u30fb\u4e0d\u4e00\u81f4\u306e\u5224\u5b9a\u65b9\u6cd5\u3068\u8f9e\u66f8\u9806\u6bd4\u8f03\u306e\u4ed5\u7d44\u307f<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>is\u6f14\u7b97\u5b50<\/strong>\u304c==\u3068\u4f55\u304c\u9055\u3046\u306e\u304b\u3001\u306a\u305cNone\u5224\u5b9a\u4ee5\u5916\u3067\u306f\u4f7f\u3063\u3066\u306f\u3044\u3051\u306a\u3044\u306e\u304b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>in\u30fbnot in\u6f14\u7b97\u5b50<\/strong>\u306b\u3088\u308b\u90e8\u5206\u4e00\u81f4\u306e\u691c\u7d22\u3068\u3001find\/index\/startswith\/endswith\u3068\u306e\u4f7f\u3044\u5206\u3051<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>re.match \/ re.search \/ re.fullmatch \/ re.findall<\/strong>\u306e\u9055\u3044\u3068\u5b9f\u7528\u7684\u306a\u6b63\u898f\u8868\u73fe\u30d1\u30bf\u30fc\u30f3<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>lower() \/ casefold()<\/strong>\u3092\u4f7f\u3063\u305f\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3057\u305f\u6bd4\u8f03\u306e\u6b63\u3057\u3044\u5b9f\u88c5<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u65e5\u672c\u8a9e\u30fb\u30de\u30eb\u30c1\u30d0\u30a4\u30c8\u6587\u5b57<\/strong>\u3092\u542b\u3080\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u6ce8\u610f\u70b9\u3068unicode\u30c7\u30fc\u30bf\u306e\u6271\u3044\u65b9<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>Claude Code<\/strong>\u3092\u4f7f\u3063\u3066\u6587\u5b57\u5217\u51e6\u7406\u30b3\u30fc\u30c9\u3092\u81ea\u52d5\u751f\u6210\u3057\u3001\u958b\u767a\u901f\u5ea6\u3092\u5927\u5e45\u306b\u4e0a\u3052\u308b\u65b9\u6cd5<\/span><\/div>\n\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-python-string-compare&#038;blog_slug=cc-python-string-compare\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-python-string-compare&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-01\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">01<\/span>\n  <span class=\"section-label\" style=\"display:block;\">BASIC COMPARISON<\/span>\n  <span class=\"section-title\" style=\"display:block;\">Python\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u57fa\u790e\uff08==\u30fb!=\u6f14\u7b97\u5b50\uff09<\/span>\n  <span class=\"section-desc\">\u6587\u5b57\u5217\u306e\u5b8c\u5168\u4e00\u81f4\u30fb\u4e0d\u4e00\u81f4\u306e\u5224\u5b9a\u3068\u8f9e\u66f8\u9806\u6bd4\u8f03\u3092\u7406\u89e3\u3059\u308b<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Python\u3067\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3059\u308b\u6700\u3082\u57fa\u672c\u7684\u306a\u65b9\u6cd5\u306f\u3001<strong>==\uff08\u7b49\u5024\u6f14\u7b97\u5b50\uff09<\/strong>\u3068<strong>!=\uff08\u4e0d\u7b49\u5024\u6f14\u7b97\u5b50\uff09<\/strong>\u3092\u4f7f\u3046\u65b9\u6cd5\u3067\u3059\u3002\u591a\u304f\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3068\u5171\u901a\u306e\u66f8\u304d\u65b9\u306a\u306e\u3067\u3001\u521d\u3081\u3066\u89e6\u308b\u65b9\u306b\u3082\u76f4\u611f\u7684\u306b\u7406\u89e3\u3057\u3084\u3059\u3044\u6f14\u7b97\u5b50\u3067\u3059\u3002\u307e\u305a\u306f\u3053\u306e\u57fa\u672c\u3092\u3057\u3063\u304b\u308a\u62bc\u3055\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">==\u30fb!=\u6f14\u7b97\u5b50\u306e\u57fa\u672c\u69cb\u6587<\/div>\n  <p><code>s1 = \"hello\"<\/code><br><code>s2 = \"hello\"<\/code><br><code>s3 = \"world\"<\/code><br><br><code>print(s1 == s2)  # True\uff08\u5024\u304c\u540c\u3058\uff09<\/code><br><code>print(s1 == s3)  # False\uff08\u5024\u304c\u9055\u3046\uff09<\/code><br><code>print(s1 != s3)  # True\uff08\u4e0d\u4e00\u81f4\u306e\u78ba\u8a8d\uff09<\/code><\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">==\u6f14\u7b97\u5b50\u306f<strong>\u6587\u5b57\u5217\u306e\u300c\u5024\u300d\u304c\u7b49\u3057\u3044\u304b\u3069\u3046\u304b<\/strong>\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002\u5927\u6587\u5b57\u3068\u5c0f\u6587\u5b57\u306f\u533a\u5225\u3055\u308c\u308b\u305f\u3081\u3001<code>\"Hello\"<\/code>\u3068<code>\"hello\"<\/code>\u306f\u7570\u306a\u308b\u6587\u5b57\u5217\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002\u3053\u308c\u306fPython\u304c\u5185\u90e8\u3067Unicode\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u6570\u5024\u30921\u6587\u5b57\u305a\u3064\u9806\u756a\u306b\u6bd4\u8f03\u3057\u3066\u3044\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>Unicode\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8<\/strong>\uff1aUnicode\u3067\u5b9a\u7fa9\u3055\u308c\u305f\u5404\u6587\u5b57\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\u56fa\u6709\u306e\u756a\u53f7\u3002\u4f8b\u3048\u3070\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u5c0f\u6587\u5b57a\u306fU+0061\uff08\u5341\u9032\u6570\u306797\uff09\u3001\u5927\u6587\u5b57A\u306fU+0041\uff08\u5341\u9032\u6570\u306765\uff09\u3068\u7570\u306a\u308b\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u6301\u3064\u3002Python\u306e\u6587\u5b57\u5217\u6bd4\u8f03\u306f\u3053\u306e\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u6570\u5024\u3092\u4f7f\u3063\u3066\u5927\u5c0f\u3092\u5224\u5b9a\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u5927\u6587\u5b57\u306f\u5c0f\u6587\u5b57\u3088\u308a\u300c\u5c0f\u3055\u3044\uff08\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u9806\u3067\u5148\uff09\u300d\u3068\u5224\u5b9a\u3055\u308c\u308b\u3002<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">1-1. \u5927\u5c0f\u6bd4\u8f03\u6f14\u7b97\u5b50\u306b\u3088\u308b\u8f9e\u66f8\u9806\u6bd4\u8f03<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Python\u306e\u6587\u5b57\u5217\u6bd4\u8f03\u3067\u306f\u3001==\u3068!=\u3060\u3051\u3067\u306a\u304f\u3001<strong>&lt;\uff08\u3088\u308a\u5c0f\u3055\u3044\uff09\u30fb&gt;\uff08\u3088\u308a\u5927\u304d\u3044\uff09\u30fb&lt;=\uff08\u4ee5\u4e0b\uff09\u30fb&gt;=\uff08\u4ee5\u4e0a\uff09<\/strong>\u306e\u6f14\u7b97\u5b50\u3082\u4f7f\u3048\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u6587\u5b57\u5217\u3092<strong>\u8f9e\u66f8\u9806\uff08\u30ec\u30ad\u30b7\u30b3\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u9806\uff09<\/strong>\u3067\u6bd4\u8f03\u3057\u307e\u3059\u3002\u8f9e\u66f8\u306e\u7d22\u5f15\u3068\u540c\u3058\u8003\u3048\u65b9\u3067\u3001\u5148\u982d\u306e\u6587\u5b57\u304b\u3089\u9806\u756a\u306bUnicode\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u6bd4\u8f03\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">\u8f9e\u66f8\u9806\u6bd4\u8f03\u306e\u4f8b<\/div>\n  <p><code>print(\"apple\" &lt; \"banana\")  # True\uff08a\u306fb\u3088\u308a\u5c0f\u3055\u3044\uff09<\/code><br><code>print(\"abc\" &lt; \"abd\")      # True\uff083\u6587\u5b57\u76ee\u3067c\u306fd\u3088\u308a\u5c0f\u3055\u3044\uff09<\/code><br><code>print(\"ABC\" &lt; \"abc\")      # True\uff08\u5927\u6587\u5b57\u306f\u5c0f\u6587\u5b57\u3088\u308a\u5c0f\u3055\u3044\uff09<\/code><br><code>print(\"10\" &lt; \"9\")         # True\uff08\"1\"\u306e\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u306f\"9\"\u3088\u308a\u5c0f\u3055\u3044\uff09<\/code><br><br><code># \u6570\u5024\u6587\u5b57\u5217\u306e\u6bd4\u8f03\u306f\u6ce8\u610f\u304c\u5fc5\u8981<\/code><br><code>print(\"100\" &lt; \"20\")       # True\uff08\u6587\u5b57\u5217\u6bd4\u8f03\u306a\u306e\u3067\"1\"\u3068\"2\"\u3092\u6bd4\u8f03\uff09<\/code><\/p>\n<\/div>\n\n\n\n<div style=\"background:#fef2f2;border:2px solid #dc2626;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:20px;\">&#9888;&#65039;<\/span>\n    <strong style=\"color:#dc2626;font-size:16px;\">\u6570\u5024\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u6bd4\u8f03\u3059\u308b\u843d\u3068\u3057\u7a74<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u6570\u5024\u3092\u6587\u5b57\u5217\u578b\u3067\u4fdd\u6301\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u305d\u306e\u307e\u307e\u6bd4\u8f03\u3059\u308b\u3068\u8f9e\u66f8\u9806\u3067\u306e\u6bd4\u8f03\u306b\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070<code>\"100\" &lt; \"20\"<\/code>\u306fTrue\u306b\u306a\u308a\u307e\u3059\uff08\u5148\u982d\u6587\u5b57\u306e\"1\"\u3068\"2\"\u3092\u6bd4\u8f03\u3059\u308b\u305f\u3081\uff09\u3002\u6570\u5024\u3068\u3057\u3066\u5927\u5c0f\u6bd4\u8f03\u3057\u305f\u3044\u3068\u304d\u306f<code>int(s)<\/code>\u3084<code>float(s)<\/code>\u3067\u5909\u63db\u3057\u3066\u304b\u3089\u6bd4\u8f03\u3059\u308b\u3053\u3068\u304c\u5fc5\u9808\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8f9e\u66f8\u9806\u6bd4\u8f03\u306f\u3001\u30ea\u30b9\u30c8\u306e\u4e26\u3079\u66ff\u3048\u3084\u540d\u524d\u306e\u9806\u756a\u4ed8\u3051\u306a\u3069\u3001<strong>\u6587\u5b57\u5217\u306e\u30bd\u30fc\u30c8\u51e6\u7406<\/strong>\u3067\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002Python\u6a19\u6e96\u306e<code>sorted()<\/code>\u95a2\u6570\u306f\u6587\u5b57\u5217\u30ea\u30b9\u30c8\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u8f9e\u66f8\u9806\u306b\u30bd\u30fc\u30c8\u3059\u308b\u305f\u3081\u3001\u3053\u306e\u4ed5\u7d44\u307f\u3092\u7406\u89e3\u3057\u3066\u304a\u304f\u3068\u4e26\u3079\u66ff\u3048\u7d50\u679c\u306e\u4e88\u6e2c\u304c\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<table>\n<thead><tr><th>\u6f14\u7b97\u5b50<\/th><th>\u610f\u5473<\/th><th>\u30b3\u30fc\u30c9\u4f8b<\/th><th>\u7d50\u679c<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>==<\/td><td>\u5024\u304c\u7b49\u3057\u3044<\/td><td>\"abc\" == \"abc\"<\/td><td>True<\/td><\/tr>\n<tr><td>!=<\/td><td>\u5024\u304c\u7b49\u3057\u304f\u306a\u3044<\/td><td>\"abc\" != \"xyz\"<\/td><td>True<\/td><\/tr>\n<tr><td><<\/td><td>\u8f9e\u66f8\u9806\u3067\u524d<\/td><td>\"abc\" < \"abd\"<\/td><td>True<\/td><\/tr>\n<tr><td>><\/td><td>\u8f9e\u66f8\u9806\u3067\u5f8c<\/td><td>\"xyz\" > \"abc\"<\/td><td>True<\/td><\/tr>\n<tr><td><=<\/td><td>\u8f9e\u66f8\u9806\u3067\u524d\u304b\u7b49\u3057\u3044<\/td><td>\"abc\" <= \"abc\"<\/td><td>True<\/td><\/tr>\n<tr><td>>=<\/td><td>\u8f9e\u66f8\u9806\u3067\u5f8c\u304b\u7b49\u3057\u3044<\/td><td>\"xyz\" >= \"xyz\"<\/td><td>True<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u57fa\u672c\u30eb\u30fc\u30eb<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">==\u306f\u6587\u5b57\u5217\u306e\u300c\u5185\u5bb9\uff08\u5024\uff09\u300d\u304c\u4e00\u81f4\u3059\u308b\u304b\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002\u5148\u982d\u6587\u5b57\u304b\u30891\u6587\u5b57\u305a\u3064Unicode\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u6bd4\u8f03\u3057\u3001\u5168\u6587\u5b57\u304c\u4e00\u81f4\u3057\u305f\u3068\u304d\u3060\u3051True\u306b\u306a\u308a\u307e\u3059\u3002\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306f\u5225\u306e\u6587\u5b57\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u305f\u3081\u3001\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3057\u305f\u6bd4\u8f03\u304c\u5fc5\u8981\u306a\u5834\u5408\u306fcasefold()\u307e\u305f\u306flower()\u3092\u4f7f\u3063\u3066\u7d71\u4e00\u3057\u3066\u304b\u3089\u6bd4\u8f03\u3057\u307e\u3059\uff08Section 05\u3067\u8a73\u8ff0\uff09\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">==\u6f14\u7b97\u5b50\u306f\u4e00\u898b\u30b7\u30f3\u30d7\u30eb\u306b\u898b\u3048\u307e\u3059\u304c\u3001\u6587\u5b57\u5217\u304c\u6570\u5024\u3092\u8868\u3057\u3066\u3044\u308b\u5834\u5408\u306e\u6319\u52d5\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002\"2\" > \"10\"\u304cTrue\u306b\u306a\u308b\u306e\u3092\u521d\u898b\u3067\u9a5a\u304f\u65b9\u306f\u591a\u3044\u3067\u3059\u3002\u578b\u5909\u63db\u306e\u610f\u8b58\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-python-string-compare&#038;blog_slug=cc-python-string-compare\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-python-string-compare&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-02\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">02<\/span>\n  <span class=\"section-label\" style=\"display:block;\">IS OPERATOR<\/span>\n  <span class=\"section-title\" style=\"display:block;\">is\u6f14\u7b97\u5b50\u3068\u306f\u4f55\u304b\u30fb==\u3068\u306e\u6c7a\u5b9a\u7684\u306a\u9055\u3044<\/span>\n  <span class=\"section-desc\">\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u540c\u4e00\u6027\u306e\u6bd4\u8f03\u3068\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u306e\u7f60\u3092\u5b8c\u5168\u7406\u89e3\u3059\u308b<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Python\u3092\u5b66\u3073\u59cb\u3081\u308b\u3068\u65e9\u3044\u6bb5\u968e\u3067<code>is<\/code>\u6f14\u7b97\u5b50\u306b\u51fa\u4f1a\u3044\u307e\u3059\u3002\u4e00\u898b<code>==<\/code>\u3068\u4f3c\u305f\u3088\u3046\u306a\u52d5\u4f5c\u3092\u3059\u308b\u3053\u3068\u304c\u3042\u308b\u305f\u3081\u3001<strong>\u300cis \u3068 == \u306f\u540c\u3058\u3088\u3046\u306a\u3082\u306e\u300d\u3068\u8aa4\u89e3\u3057\u3066\u3057\u307e\u3046\u30b1\u30fc\u30b9\u304c\u975e\u5e38\u306b\u591a\u3044<\/strong>\u306e\u3067\u3059\u304c\u3001\u3053\u308c\u306f\u5927\u304d\u306a\u9593\u9055\u3044\u3067\u3059\u3002\u3053\u306e\u8aa4\u89e3\u304c\u539f\u56e0\u3067\u3001\u672c\u756a\u74b0\u5883\u3067\u7a00\u306b\u3057\u304b\u767a\u751f\u3057\u306a\u3044\u4e0d\u601d\u8b70\u306a\u30d0\u30b0\u3092\u751f\u307f\u51fa\u3059\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>is\u6f14\u7b97\u5b50<\/strong>\uff1aPython\u306b\u304a\u3044\u3066\u300c2\u3064\u306e\u5909\u6570\u304c\u5168\u304f\u540c\u4e00\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53c2\u7167\u3057\u3066\u3044\u308b\u304b\u300d\u3092\u5224\u5b9a\u3059\u308b\u6f14\u7b97\u5b50\u3002\u5024\u306e\u5185\u5bb9\u3067\u306f\u306a\u304f\u3001\u30e1\u30e2\u30ea\u4e0a\u306e\u540c\u4e00\u30a2\u30c9\u30ec\u30b9\u3092\u6307\u3057\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3059\u308b\u3002id()\u95a2\u6570\u3067\u53d6\u5f97\u3067\u304d\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8ID\u304c\u7b49\u3057\u3044\u304b\u3092\u6bd4\u8f03\u3057\u3066\u3044\u308b\u306e\u3068\u540c\u7fa9\u3002<\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">is\u6f14\u7b97\u5b50\u306f<strong>\u5024\u306e\u5185\u5bb9\uff08==\uff09\u3067\u306f\u306a\u304f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u540c\u4e00\u6027\u3092\u6bd4\u8f03<\/strong>\u3057\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u300c2\u3064\u306e\u5909\u6570\u304c\u540c\u3058\u5185\u5bb9\u3092\u6301\u3063\u3066\u3044\u308b\u304b\u300d\u3067\u306f\u306a\u304f\u3001\u300c2\u3064\u306e\u5909\u6570\u304c\u30e1\u30e2\u30ea\u4e0a\u306e\u5168\u304f\u540c\u3058\u5834\u6240\u3092\u6307\u3057\u3066\u3044\u308b\u304b\u300d\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">is\u3068id\u306e\u95a2\u4fc2<\/div>\n  <p><code>a = \"hello\"<\/code><br><code>b = \"hello\"<\/code><br><code>c = a<\/code><br><br><code>print(a == b)   # True\uff08\u5024\u304c\u540c\u3058\uff09<\/code><br><code>print(a is b)   # True or False\uff08\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u4f9d\u5b58\uff09<\/code><br><code>print(a is c)   # True\uff08\u540c\u3058\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53c2\u7167\uff09<\/code><br><br><code>print(id(a))    # \u4f8b: 140234567890<\/code><br><code>print(id(b))    # \u540c\u3058\u304b\u7570\u306a\u308b\u304b\u306f\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u4f9d\u5b58<\/code><br><code>print(id(c))    # id(a)\u3068\u5fc5\u305a\u540c\u3058<\/code><\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2-1. \u6587\u5b57\u5217\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u3068\u306f\u4f55\u304b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Python\u306b\u306f<strong>\u6587\u5b57\u5217\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\uff08string interning\uff09<\/strong>\u3068\u3044\u3046\u6700\u9069\u5316\u306e\u4ed5\u7d44\u307f\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u540c\u3058\u5185\u5bb9\u306e\u6587\u5b57\u5217\u30ea\u30c6\u30e9\u30eb\u3092\u8907\u6570\u306e\u5909\u6570\u306b\u4ee3\u5165\u3057\u305f\u3068\u304d\u3001Python\u304c\u5185\u90e8\u7684\u306b\u540c\u4e00\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3044\u56de\u3059\u6700\u9069\u5316\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30e1\u30e2\u30ea\u306e\u7bc0\u7d04\u3068\u6bd4\u8f03\u306e\u9ad8\u901f\u5316\u304c\u5b9f\u73fe\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\uff08Interning\uff09<\/strong>\uff1aPython\u30a4\u30f3\u30bf\u30fc\u30d7\u30ea\u30bf\u304c\u81ea\u52d5\u3067\u884c\u3046\u30e1\u30e2\u30ea\u6700\u9069\u5316\u3002\u7279\u5b9a\u306e\u6761\u4ef6\uff08\u77ed\u3044\u6587\u5b57\u5217\u30fb\u8b58\u5225\u5b50\u3068\u3057\u3066\u6709\u52b9\u306a\u6587\u5b57\u5217\u30fb\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u5b9a\u307e\u308b\u30ea\u30c6\u30e9\u30eb\uff09\u3092\u6e80\u305f\u3059\u6587\u5b57\u5217\u306f\u3001\u540c\u4e00\u5185\u5bb9\u3067\u3042\u308c\u3070\u540c\u4e00\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u3002sys.intern()\u3092\u4f7f\u3063\u3066\u624b\u52d5\u3067\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u306e\u6319\u52d5\u306e\u4f8b<\/div>\n  <p><code>a = \"hello\"<\/code><br><code>b = \"hello\"<\/code><br><code>print(a is b)   # True\uff08\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u30ea\u30c6\u30e9\u30eb\u306a\u306e\u3067\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u767a\u751f\uff09<\/code><br><br><code># \u5b9f\u884c\u6642\u306b\u52d5\u7684\u306b\u751f\u6210\u3057\u305f\u6587\u5b57\u5217\u306f\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u3055\u308c\u306a\u3044<\/code><br><code>x = \"hel\" + \"lo\"  # \u5b9f\u884c\u6642\u306b\u751f\u6210<\/code><br><code>y = \"hello\"<\/code><br><code>print(x == y)   # True\uff08\u5024\u304c\u540c\u3058\uff09<\/code><br><code>print(x is y)   # True\u306e\u3053\u3068\u3082\u3042\u308b\u304c\u4fdd\u8a3c\u3055\u308c\u306a\u3044\uff08\u5b9f\u88c5\u4f9d\u5b58\uff09<\/code><br><br><code># \u52d5\u7684\u751f\u6210\u6587\u5b57\u5217\u306e\u5834\u5408<\/code><br><code>name = input()  # \u30e6\u30fc\u30b6\u30fc\u5165\u529b\u304b\u3089\u53d6\u5f97<\/code><br><code>print(name is \"hello\")  # \u5fc5\u305aFalse\uff08\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u3055\u308c\u3066\u3044\u306a\u3044\uff09<\/code><\/p>\n<\/div>\n\n\n\n<div style=\"background:#fef2f2;border:2px solid #dc2626;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:20px;\">&#9888;&#65039;<\/span>\n    <strong style=\"color:#dc2626;font-size:16px;\">is\u3067\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3057\u3066\u306f\u3044\u3051\u306a\u3044\u7406\u7531<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u6587\u5b57\u5217\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u306fPython\u306e\u5185\u90e8\u5b9f\u88c5\u306e\u6700\u9069\u5316\u3067\u3042\u308a\u3001\u30d7\u30ed\u30b0\u30e9\u30de\u304c\u5236\u5fa1\u3067\u304d\u308b\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306e\u30ea\u30c6\u30e9\u30eb\u306f\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u3055\u308c\u308b\u5834\u5408\u304c\u591a\u3044\u3067\u3059\u304c\u3001\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u30fb\u30d5\u30a1\u30a4\u30eb\u8aad\u8fbc\u30fb\u6587\u5b57\u5217\u6f14\u7b97\u306e\u7d50\u679c\u306a\u3069\u306e\u52d5\u7684\u306b\u751f\u6210\u3055\u308c\u305f\u6587\u5b57\u5217\u306f<strong>\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u3055\u308c\u306a\u3044<\/strong>\u305f\u3081\u3001\u540c\u3058\u5185\u5bb9\u3067\u3082is\u304cFalse\u306b\u306a\u308a\u307e\u3059\u3002\u6587\u5b57\u5217\u306e\u5185\u5bb9\u6bd4\u8f03\u306b\u306f\u5fc5\u305a==\u3092\u4f7f\u3044\u3001is\u306fNone\u3084\u771f\u507d\u5024\u306e\u6bd4\u8f03\u306b\u9650\u5b9a\u3059\u308b\u306e\u304c\u9244\u5247\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2-2. is\u3092\u6b63\u3057\u304f\u4f7f\u3046\u552f\u4e00\u306e\u30b1\u30fc\u30b9\uff1aNone\u3068\u306e\u6bd4\u8f03<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">is\u3092\u6587\u5b57\u5217\u6bd4\u8f03\u306b\u4f7f\u3046\u306e\u306fNG\u3067\u3059\u304c\u3001<strong>None\u3068\u306e\u6bd4\u8f03\u306f\u9006\u306bis\u3092\u4f7f\u3046\u306e\u304cPython\u306e\u6b63\u3057\u3044\u66f8\u304d\u65b9<\/strong>\u3067\u3059\u3002Python\u306eNone\u306f\u30d7\u30ed\u30bb\u30b9\u5185\u306b\u5fc5\u305a1\u3064\u3057\u304b\u5b58\u5728\u3057\u306a\u3044\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306a\u306e\u3067\u3001is\u306b\u3088\u308b\u540c\u4e00\u6027\u6bd4\u8f03\u304c\u78ba\u5b9f\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">None\u306e\u6bd4\u8f03\u306fis\u3092\u4f7f\u3046<\/div>\n  <p><code># \u6b63\u3057\u3044\u66f8\u304d\u65b9<\/code><br><code>if value is None:<\/code><br><code>    print(\"\u5024\u304cNone\u3067\u3059\")<\/code><br><br><code>if value is not None:<\/code><br><code>    print(\"\u5024\u304c\u3042\u308a\u307e\u3059\")<\/code><br><br><code># \u975e\u63a8\u5968\uff08\u52d5\u4f5c\u3059\u308b\u304c\u6163\u4f8b\u3068\u3057\u3066NG\uff09<\/code><br><code>if value == None:   # PEP8\u3067warning\u5bfe\u8c61<\/code><br><code>    pass<\/code><\/p>\n<\/div>\n\n\n\n<table>\n<thead><tr><th>\u7528\u9014<\/th><th>\u4f7f\u3046\u6f14\u7b97\u5b50<\/th><th>\u7406\u7531<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>\u6587\u5b57\u5217\u306e\u5185\u5bb9\u3092\u6bd4\u8f03\u3059\u308b<\/td><td>==\uff08\u5fc5\u9808\uff09<\/td><td>\u5024\u306e\u7b49\u4fa1\u6027\u3092\u5224\u5b9a\u3059\u308b\u305f\u3081<\/td><\/tr>\n<tr><td>None\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b<\/td><td>is\uff08\u63a8\u5968\uff09<\/td><td>None\u306f\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u306a\u306e\u3067is\u306e\u307b\u3046\u304c\u78ba\u5b9f\u3067\u9ad8\u901f<\/td><\/tr>\n<tr><td>True\/False\u3092\u78ba\u8a8d\u3059\u308b<\/td><td>is\uff08\u6163\u4f8b\uff09<\/td><td>True\u3068False\u3082\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u3002Python\u30b9\u30bf\u30a4\u30eb\u30ac\u30a4\u30c9\uff08PEP8\uff09\u304c\u63a8\u5968<\/td><\/tr>\n<tr><td>\u540c\u3058\u30ea\u30b9\u30c8\u3092\u53c2\u7167\u3057\u3066\u3044\u308b\u304b<\/td><td>is<\/td><td>\u30b3\u30d4\u30fc\u3068\u5143\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u533a\u5225\u3057\u305f\u3044\u5834\u5408<\/td><\/tr>\n<tr><td>\u6587\u5b57\u5217\u304c\u540c\u4e00\u6587\u5b57\u304b\u3069\u3046\u304b<\/td><td>==\uff08\u5fc5\u305a\uff09<\/td><td>is\u306f\u7d76\u5bfe\u306b\u4f7f\u308f\u306a\u3044<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u5b9f\u52d9\u3067\u30ec\u30d3\u30e5\u30fc\u3057\u3066\u3044\u308b\u3068\u3001is\u3068\u306e\u6bd4\u8f03\u304c\u6df7\u5728\u3057\u3066\u3044\u308b\u30b3\u30fc\u30c9\u306b\u51fa\u304f\u308f\u3059\u3053\u3068\u304c\u3088\u304f\u3042\u308a\u307e\u3059\u3002\u7279\u306b\u300cNone\u3092\u9664\u5916\u3057\u305f\u3044\u3060\u3051\u300d\u306e\u3064\u3082\u308a\u3067if value is not None\u3068\u66f8\u304f\u306e\u306f\u6b63\u3057\u3044\u306e\u3067\u3059\u304c\u3001if value is not \"error\"\u306e\u3088\u3046\u306a\u66f8\u304d\u65b9\u306f\u30d0\u30b0\u306e\u6e29\u5e8a\u3067\u3059\u3002\u30eb\u30fc\u30eb\u3092\u660e\u78ba\u306b\u3057\u3066\u5b88\u308b\u7fd2\u6163\u3092\u3064\u3051\u307e\u3057\u3087\u3046\u3002<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-python-string-compare&#038;blog_slug=cc-python-string-compare\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-python-string-compare&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-03\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">03<\/span>\n  <span class=\"section-label\" style=\"display:block;\">SUBSTRING SEARCH<\/span>\n  <span class=\"section-title\" style=\"display:block;\">in\u6f14\u7b97\u5b50\u306b\u3088\u308b\u90e8\u5206\u4e00\u81f4\u691c\u7d22<\/span>\n  <span class=\"section-desc\">in\/not in\u30fbfind\/index\u30fbstartswith\/endswith\u306e\u4f7f\u3044\u5206\u3051\u3092\u6574\u7406\u3059\u308b<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6587\u5b57\u5217\u306e\u5b8c\u5168\u4e00\u81f4\u3060\u3051\u3067\u306a\u304f\u3001<strong>\u300c\u7279\u5b9a\u306e\u6587\u5b57\u3084\u5358\u8a9e\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u300d\u3092\u8abf\u3079\u305f\u3044\u30b1\u30fc\u30b9<\/strong>\u306f\u975e\u5e38\u306b\u591a\u304f\u3042\u308a\u307e\u3059\u3002Python\u306b\u306f\u90e8\u5206\u4e00\u81f4\u3092\u691c\u7d22\u3059\u308b\u305f\u3081\u306e\u6f14\u7b97\u5b50\u3084\u30e1\u30bd\u30c3\u30c9\u304c\u8907\u6570\u7528\u610f\u3055\u308c\u3066\u304a\u308a\u3001\u305d\u308c\u305e\u308c\u4f7f\u3044\u3069\u3053\u308d\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">in\u6f14\u7b97\u5b50\u306e\u57fa\u672c\u69cb\u6587<\/div>\n  <p><code>text = \"Python\u6587\u5b57\u5217\u306e\u6bd4\u8f03\u306f\u9762\u767d\u3044\"<\/code><br><br><code>print(\"\u6bd4\u8f03\" in text)      # True<\/code><br><code>print(\"Java\" in text)     # False<\/code><br><code>print(\"Java\" not in text) # True<\/code><br><br><code># \u30ea\u30b9\u30c8\u3067\u3082\u4f7f\u3048\u308b<\/code><br><code>words = [\"apple\", \"banana\", \"cherry\"]<\/code><br><code>print(\"banana\" in words)   # True<\/code><\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">in\u6f14\u7b97\u5b50\u306f\u6587\u5b57\u5217\u306e\u4e2d\u306b\u6307\u5b9a\u3057\u305f\u90e8\u5206\u6587\u5b57\u5217\u304c\u542b\u307e\u308c\u3066\u3044\u308c\u3070<code>True<\/code>\u3092\u8fd4\u3057\u307e\u3059\u3002<code>not in<\/code>\u306f\u305d\u306e\u9006\u3067\u3001\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306b<code>True<\/code>\u3092\u8fd4\u3057\u307e\u3059\u3002\u66f8\u304d\u65b9\u304c\u30b7\u30f3\u30d7\u30eb\u3067\u8aad\u307f\u3084\u3059\u304f\u3001Python\u30b3\u30fc\u30c9\u3067\u306fif\u6587\u306e\u6761\u4ef6\u3068\u3057\u3066\u983b\u7e41\u306b\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3-1. find()\u3068index()\u306e\u9055\u3044<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">in\u6f14\u7b97\u5b50\u306fTrue\/False\u3057\u304b\u8fd4\u3057\u307e\u305b\u3093\u304c\u3001<strong>\u300c\u3069\u3053\u306b\u898b\u3064\u304b\u3063\u305f\u304b\uff08\u4f4d\u7f6e\uff09\u300d\u304c\u5fc5\u8981\u306a\u5834\u5408<\/strong>\u306f<code>find()<\/code>\u307e\u305f\u306f<code>index()<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002\u3069\u3061\u3089\u3082\u90e8\u5206\u4e00\u81f4\u3057\u305f\u6700\u521d\u306e\u4f4d\u7f6e\u3092\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff080\u59cb\u307e\u308a\u306e\u6574\u6570\uff09\u3067\u8fd4\u3057\u307e\u3059\u304c\u3001\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u5834\u5408\u306e\u6319\u52d5\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">find()\u3068index()\u306e\u6bd4\u8f03<\/div>\n  <p><code>text = \"Hello Python World\"<\/code><br><br><code># find(): \u898b\u3064\u304b\u3089\u306a\u3051\u308c\u3070 -1 \u3092\u8fd4\u3059<\/code><br><code>print(text.find(\"Python\"))   # 6<\/code><br><code>print(text.find(\"Java\"))     # -1<\/code><br><br><code># index(): \u898b\u3064\u304b\u3089\u306a\u3051\u308c\u3070 ValueError \u3092\u767a\u751f\u3055\u305b\u308b<\/code><br><code>print(text.index(\"Python\"))  # 6<\/code><br><code>try:<\/code><br><code>    print(text.index(\"Java\"))  # ValueError!<\/code><br><code>except ValueError:<\/code><br><code>    print(\"\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\")<\/code><\/p>\n<\/div>\n\n\n\n<table>\n<thead><tr><th>\u30e1\u30bd\u30c3\u30c9<\/th><th>\u898b\u3064\u304b\u3063\u305f\u5834\u5408<\/th><th>\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u5834\u5408<\/th><th>\u4e3b\u306a\u7528\u9014<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>in \/ not in<\/td><td>True \/ False<\/td><td>True \/ False<\/td><td>\u5b58\u5728\u78ba\u8a8d\uff08\u6700\u3082\u30b7\u30f3\u30d7\u30eb\uff09<\/td><\/tr>\n<tr><td>find()<\/td><td>\u958b\u59cb\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08int\uff09<\/td><td>-1\u3092\u8fd4\u3059<\/td><td>\u4f4d\u7f6e\u304c\u5fc5\u8981\u3067\u3001\u898b\u3064\u304b\u3089\u306a\u3044\u5834\u5408\u3082\u6b63\u5e38\u51e6\u7406\u3057\u305f\u3044\u3068\u304d<\/td><\/tr>\n<tr><td>index()<\/td><td>\u958b\u59cb\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08int\uff09<\/td><td>ValueError\u3092\u767a\u751f<\/td><td>\u300c\u5fc5\u305a\u898b\u3064\u304b\u308b\u524d\u63d0\u300d\u3067\u4f4d\u7f6e\u3092\u53d6\u5f97\u3057\u305f\u3044\u3068\u304d<\/td><\/tr>\n<tr><td>rfind()<\/td><td>\u6700\u5f8c\u306b\u51fa\u73fe\u3057\u305f\u958b\u59cb\u30a4\u30f3\u30c7\u30c3\u30af\u30b9<\/td><td>-1\u3092\u8fd4\u3059<\/td><td>\u5f8c\u65b9\u304b\u3089\u6700\u521d\u306b\u898b\u3064\u304b\u308b\u4f4d\u7f6e\u304c\u5fc5\u8981\u306a\u3068\u304d<\/td><\/tr>\n<tr><td>count()<\/td><td>\u51fa\u73fe\u56de\u6570\uff08int\uff09<\/td><td>0\u3092\u8fd4\u3059<\/td><td>\u90e8\u5206\u6587\u5b57\u5217\u304c\u4f55\u56de\u51fa\u73fe\u3059\u308b\u304b\u6570\u3048\u305f\u3044\u3068\u304d<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<h3 class=\"wp-block-heading\">3-2. startswith()\u3068endswith()\u306b\u3088\u308b\u524d\u5f8c\u4e00\u81f4<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">URL\u306e\u30d7\u30ed\u30c8\u30b3\u30eb\u78ba\u8a8d\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u62e1\u5f35\u5b50\u30c1\u30a7\u30c3\u30af\u3001\u7279\u5b9a\u306e\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u3067\u59cb\u307e\u308b\u6587\u5b57\u5217\u306e\u7d5e\u308a\u8fbc\u307f\u306a\u3069\u3001<strong>\u6587\u5b57\u5217\u306e\u5148\u982d\u3084\u672b\u5c3e\u304c\u7279\u5b9a\u306e\u6587\u5b57\u5217\u3067\u59cb\u307e\u308b\u304b\u3069\u3046\u304b<\/strong>\u3092\u78ba\u8a8d\u3057\u305f\u3044\u5834\u9762\u306f\u591a\u304f\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u3068\u304d\u306f<code>startswith()<\/code>\u3068<code>endswith()<\/code>\u304c\u6700\u9069\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">startswith()\u3068endswith()\u306e\u4f7f\u3044\u65b9<\/div>\n  <p><code>url = \"https:\/\/genai-ai.co.jp\/blog\/\"<\/code><br><code>filename = \"report_2026.pdf\"<\/code><br><br><code>print(url.startswith(\"https:\/\/\"))  # True<\/code><br><code>print(url.startswith(\"http:\/\/\"))   # False<\/code><br><code>print(filename.endswith(\".pdf\"))   # True<\/code><br><code>print(filename.endswith(\".xlsx\"))  # False<\/code><br><br><code># \u30bf\u30d7\u30eb\u3067\u8907\u6570\u30d1\u30bf\u30fc\u30f3\u3092\u307e\u3068\u3081\u3066\u78ba\u8a8d\u3067\u304d\u308b<\/code><br><code>print(filename.endswith((\".pdf\", \".xlsx\", \".csv\")))  # True<\/code><br><code>exts = (\".jpg\", \".png\", \".webp\")<\/code><br><code>print(\"photo.webp\".endswith(exts))  # True<\/code><\/p>\n<\/div>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">startswith\/endswith\u306b\u306f\u30bf\u30d7\u30eb\u304c\u6e21\u305b\u308b<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">startswith()\u3068endswith()\u306e\u5f15\u6570\u306b\u306f\u30bf\u30d7\u30eb\u3092\u6e21\u3059\u3053\u3068\u304c\u3067\u304d\u3001\u3044\u305a\u308c\u304b\u306e\u30d1\u30bf\u30fc\u30f3\u306b\u4e00\u81f4\u3059\u308c\u3070True\u3092\u8fd4\u3057\u307e\u3059\u3002\u62e1\u5f35\u5b50\u30c1\u30a7\u30c3\u30af\u3084\u8907\u6570\u30d7\u30ed\u30c8\u30b3\u30eb\u306e\u78ba\u8a8d\u306a\u3069\u3001OR\u6761\u4ef6\u3067\u30c1\u30a7\u30c3\u30af\u3057\u305f\u3044\u5834\u5408\u306b<code>if filename.endswith((\".jpg\", \".png\", \".webp\"))<\/code>\u306e\u3088\u3046\u306b\u66f8\u3051\u308b\u306e\u3067\u3001in\u6f14\u7b97\u5b50\u3068|\u6f14\u7b97\u5b50\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3088\u308a\u53ef\u8aad\u6027\u304c\u9ad8\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">startswith\/endswith\u306b\u30bf\u30d7\u30eb\u304c\u6e21\u305b\u308b\u6a5f\u80fd\u3092\u77e5\u3089\u305a\u306b\u300cif filename[-4:] == \".pdf\" or filename[-5:] == \".xlsx\"\u300d\u306e\u3088\u3046\u306b\u30b9\u30e9\u30a4\u30b9\u3067\u66f8\u3044\u3066\u3044\u308b\u65b9\u304c\u591a\u3044\u3067\u3059\u3002\u30bf\u30d7\u30eb\u5bfe\u5fdc\u3092\u6d3b\u7528\u3059\u308b\u3068\u683c\u6bb5\u306b\u3059\u3063\u304d\u308a\u66f8\u3051\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-python-string-compare&#038;blog_slug=cc-python-string-compare\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-python-string-compare&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-04\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">04<\/span>\n  <span class=\"section-label\" style=\"display:block;\">REGEX<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u6b63\u898f\u8868\u73fe\uff08re\u30e2\u30b8\u30e5\u30fc\u30eb\uff09\u306b\u3088\u308b\u9ad8\u5ea6\u306a\u6bd4\u8f03<\/span>\n  <span class=\"section-desc\">re.match\/search\/fullmatch\/findall\u306e\u9055\u3044\u3068\u3088\u304f\u4f7f\u3046\u30d1\u30bf\u30fc\u30f3<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6587\u5b57\u5217\u306e\u6bd4\u8f03\u3067\u300c\u5b8c\u5168\u4e00\u81f4\u300d\u3084\u300c\u90e8\u5206\u4e00\u81f4\u300d\u3067\u306f\u5bfe\u5fdc\u3067\u304d\u306a\u3044\u8907\u96d1\u306a\u30d1\u30bf\u30fc\u30f3\u304c\u5fc5\u8981\u306b\u306a\u3063\u305f\u3068\u304d\u3001Python\u306e<strong>re\u30e2\u30b8\u30e5\u30fc\u30eb\uff08\u6b63\u898f\u8868\u73fe\uff09<\/strong>\u306e\u51fa\u756a\u3067\u3059\u3002\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5f62\u5f0f\u30c1\u30a7\u30c3\u30af\u3001\u96fb\u8a71\u756a\u53f7\u306e\u6b63\u898f\u5316\u3001URL\u306e\u89e3\u6790\u3001\u7279\u5b9a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u30c7\u30fc\u30bf\u62bd\u51fa\u306a\u3069\u3001\u5b9f\u52d9\u3067\u306f\u6b63\u898f\u8868\u73fe\u3092\u907f\u3051\u3066\u901a\u308c\u306a\u3044\u5834\u9762\u304c\u6570\u591a\u304f\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>\u6b63\u898f\u8868\u73fe\uff08Regular Expression\uff09<\/strong>\uff1a\u6587\u5b57\u5217\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u8868\u73fe\u3059\u308b\u305f\u3081\u306e\u8a00\u8a9e\u30fb\u8a18\u6cd5\u3002\u300c\u6570\u5b57\u304c3\u6587\u5b57\u7d9a\u3044\u305f\u3042\u3068\u306b\u30cf\u30a4\u30d5\u30f3\u304c\u6765\u3066\u2026\u300d\u3068\u3044\u3046\u3088\u3046\u306a\u30d1\u30bf\u30fc\u30f3\u3092\u30b3\u30f3\u30d1\u30af\u30c8\u306b\u8a18\u8ff0\u3067\u304d\u308b\u3002Python\u3067\u306fre\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u305d\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3059\u308b\u3002\u30d1\u30bf\u30fc\u30f3\u306e\u8a18\u8ff0\u306b\u306f\u7279\u6b8a\u6587\u5b57\uff08\u30e1\u30bf\u6587\u5b57\uff09\u3092\u4f7f\u3044\u3001\\d\uff08\u6570\u5b57\uff09\u30fb\\w\uff08\u82f1\u6570\u5b57\uff09\u30fb.\uff08\u4efb\u610f\u306e1\u6587\u5b57\uff09\u30fb*\uff080\u56de\u4ee5\u4e0a\u306e\u7e70\u308a\u8fd4\u3057\uff09\u30fb+\uff081\u56de\u4ee5\u4e0a\u306e\u7e70\u308a\u8fd4\u3057\uff09\u306a\u3069\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u30d1\u30bf\u30fc\u30f3\u3092\u7d44\u307f\u7acb\u3066\u308b\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>re\u30e2\u30b8\u30e5\u30fc\u30eb<\/strong>\uff1aPython\u306e\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u542b\u307e\u308c\u308b\u6b63\u898f\u8868\u73fe\u51e6\u7406\u30e2\u30b8\u30e5\u30fc\u30eb\u3002import re\u3067\u4f7f\u7528\u3067\u304d\u308b\u3002\u4e3b\u306a\u95a2\u6570\u306fre.match\uff08\u6587\u5b57\u5217\u5148\u982d\u304b\u3089\u306e\u30de\u30c3\u30c1\uff09\u30fbre.search\uff08\u6587\u5b57\u5217\u5168\u4f53\u304b\u3089\u306e\u691c\u7d22\uff09\u30fbre.fullmatch\uff08\u6587\u5b57\u5217\u5168\u4f53\u3068\u306e\u5b8c\u5168\u30de\u30c3\u30c1\uff09\u30fbre.findall\uff08\u5168\u30de\u30c3\u30c1\u3092\u4e00\u89a7\u53d6\u5f97\uff09\u30fbre.sub\uff08\u30de\u30c3\u30c1\u3057\u305f\u90e8\u5206\u306e\u7f6e\u63db\uff09\u306e5\u3064\u3002<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4-1. re.match \/ re.search \/ re.fullmatch \/ re.findall \u306e\u9055\u3044<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">re\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4e2d\u3067\u6700\u3082\u3088\u304f\u4f7f\u30464\u3064\u306e\u95a2\u6570\u306f\u3001\u305d\u308c\u305e\u308c\u30de\u30c3\u30c1\u3059\u308b\u7bc4\u56f2\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u9055\u3044\u3092\u6df7\u540c\u3059\u308b\u3068\u30d0\u30b0\u306e\u539f\u56e0\u306b\u306a\u308b\u305f\u3081\u3001<strong>\u3069\u306e\u95a2\u6570\u304c\u3069\u306e\u7bc4\u56f2\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u304b<\/strong>\u3092\u660e\u78ba\u306b\u7406\u89e3\u3057\u3066\u304a\u304f\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<table>\n<thead><tr><th>\u95a2\u6570<\/th><th>\u30de\u30c3\u30c1\u7bc4\u56f2<\/th><th>\u623b\u308a\u5024<\/th><th>\u5178\u578b\u7684\u306a\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>re.match(pattern, string)<\/td><td>\u6587\u5b57\u5217\u306e\u5148\u982d\u306e\u307f<\/td><td>Match\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 or None<\/td><td>\u5148\u982d\u304b\u3089\u59cb\u307e\u308b\u30d1\u30bf\u30fc\u30f3\u306e\u78ba\u8a8d<\/td><\/tr>\n<tr><td>re.search(pattern, string)<\/td><td>\u6587\u5b57\u5217\u5168\u4f53\uff08\u6700\u521d\u306e1\u4ef6\uff09<\/td><td>Match\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 or None<\/td><td>\u6587\u5b57\u5217\u4e2d\u306e\u3069\u3053\u304b\u306b\u30d1\u30bf\u30fc\u30f3\u304c\u5b58\u5728\u3059\u308b\u304b\u78ba\u8a8d<\/td><\/tr>\n<tr><td>re.fullmatch(pattern, string)<\/td><td>\u6587\u5b57\u5217\u5168\u4f53\uff08\u5b8c\u5168\u4e00\u81f4\uff09<\/td><td>Match\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 or None<\/td><td>\u6587\u5b57\u5217\u5168\u4f53\u304c\u30d1\u30bf\u30fc\u30f3\u3068\u4e00\u81f4\u3059\u308b\u304b\u78ba\u8a8d<\/td><\/tr>\n<tr><td>re.findall(pattern, string)<\/td><td>\u6587\u5b57\u5217\u5168\u4f53\uff08\u5168\u4ef6\uff09<\/td><td>\u30de\u30c3\u30c1\u3057\u305f\u6587\u5b57\u5217\u306e\u30ea\u30b9\u30c8<\/td><td>\u30d1\u30bf\u30fc\u30f3\u306b\u30de\u30c3\u30c1\u3059\u308b\u5168\u3066\u306e\u90e8\u5206\u3092\u53d6\u5f97<\/td><\/tr>\n<tr><td>re.sub(pattern, repl, string)<\/td><td>\u6587\u5b57\u5217\u5168\u4f53\uff08\u7f6e\u63db\uff09<\/td><td>\u7f6e\u63db\u5f8c\u306e\u6587\u5b57\u5217<\/td><td>\u30d1\u30bf\u30fc\u30f3\u306b\u30de\u30c3\u30c1\u3057\u305f\u90e8\u5206\u3092\u5225\u306e\u6587\u5b57\u5217\u306b\u7f6e\u63db<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">4\u3064\u306e\u95a2\u6570\u306e\u52d5\u4f5c\u6bd4\u8f03<\/div>\n  <p><code>import re<\/code><br><br><code>text = \"\u96fb\u8a71\u756a\u53f7\u306f03-1234-5678\u3067\u3059\"<\/code><br><code>pattern = r\"\\d{2,4}-\\d{4}-\\d{4}\"<\/code><br><br><code># match: \u5148\u982d\u304b\u3089\u63a2\u3059\u306e\u3067None\uff08\u5148\u982d\u306f\u300c\u96fb\u8a71\u300d\uff09<\/code><br><code>print(re.match(pattern, text))    # None<\/code><br><br><code># search: \u6587\u5b57\u5217\u5168\u4f53\u304b\u3089\u63a2\u3057\u3066Match\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3059<\/code><br><code>m = re.search(pattern, text)<\/code><br><code>print(m.group() if m else None)   # \"03-1234-5678\"<\/code><br><br><code># fullmatch: \u6587\u5b57\u5217\u5168\u4f53\u3068\u306e\u5b8c\u5168\u4e00\u81f4\u306a\u306e\u3067None<\/code><br><code>print(re.fullmatch(pattern, text))  # None<\/code><br><code>phone_only = \"03-1234-5678\"<\/code><br><code>print(re.fullmatch(pattern, phone_only))  # Match\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/code><br><br><code># findall: \u5168\u4ef6\u53d6\u5f97<\/code><br><code>text2 = \"03-1234-5678\u3068090-9876-5432\"<\/code><br><code>print(re.findall(pattern, text2))  # [\"03-1234-5678\", \"090-9876-5432\"]<\/code><\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4-2. \u30b0\u30eb\u30fc\u30d7\u30ad\u30e3\u30d7\u30c1\u30e3\u3067\u90e8\u5206\u62bd\u51fa<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b63\u898f\u8868\u73fe\u3067\u306f<strong>\u4e38\u62ec\u5f27\uff08\uff09\u3067\u30b0\u30eb\u30fc\u30d7\u3092\u4f5c\u308b<\/strong>\u3068\u3001\u30de\u30c3\u30c1\u3057\u305f\u6587\u5b57\u5217\u306e\u4e2d\u304b\u3089\u7279\u5b9a\u306e\u90e8\u5206\u3060\u3051\u3092\u629c\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304b\u3089\u30c9\u30e1\u30a4\u30f3\u540d\u3060\u3051\u3092\u53d6\u308a\u51fa\u3059\u3001URL\u304b\u3089\u30d1\u30b9\u306e\u7279\u5b9a\u90e8\u5206\u3092\u62bd\u51fa\u3059\u308b\u306a\u3069\u3001\u30c7\u30fc\u30bf\u89e3\u6790\u30fb\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30fb\u5909\u63db\u51e6\u7406\u3067\u975e\u5e38\u306b\u5f37\u529b\u306a\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">\u30b0\u30eb\u30fc\u30d7\u30ad\u30e3\u30d7\u30c1\u30e3\u306e\u4f7f\u3044\u65b9<\/div>\n  <p><code>import re<\/code><br><br><code>email = \"user@example.com\"<\/code><br><code>pattern = r\"([^@]+)@([^@]+)\"<\/code><br><br><code>m = re.match(pattern, email)<\/code><br><code>if m:<\/code><br><code>    print(m.group(0))  # \"user@example.com\"\uff08\u5168\u4f53\uff09<\/code><br><code>    print(m.group(1))  # \"user\"\uff081\u3064\u76ee\u306e\u30b0\u30eb\u30fc\u30d7\uff09<\/code><br><code>    print(m.group(2))  # \"example.com\"\uff082\u3064\u76ee\u306e\u30b0\u30eb\u30fc\u30d7\uff09<\/code><br><br><code># \u540d\u524d\u4ed8\u304d\u30b0\u30eb\u30fc\u30d7(?P&lt;\u540d\u524d&gt;\u30d1\u30bf\u30fc\u30f3)<\/code><br><code>pattern2 = r\"(?P&lt;user&gt;[^@]+)@(?P&lt;domain&gt;[^@]+)\"<\/code><br><code>m2 = re.match(pattern2, email)<\/code><br><code>if m2:<\/code><br><code>    print(m2.group(\"user\"))    # \"user\"<\/code><br><code>    print(m2.group(\"domain\"))  # \"example.com\"<\/code><\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4-3. \u3088\u304f\u4f7f\u3046\u6b63\u898f\u8868\u73fe\u30d1\u30bf\u30fc\u30f3\u96c6<\/h3>\n\n\n\n<table>\n<thead><tr><th>\u7528\u9014<\/th><th>\u30d1\u30bf\u30fc\u30f3<\/th><th>\u8aac\u660e<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9<\/td><td>[\\w.+-]+@[\\w-]+\\.[a-zA-Z]{2,}<\/td><td>\u30b7\u30f3\u30d7\u30eb\u306a\u5f62\u5f0f\u30c1\u30a7\u30c3\u30af<\/td><\/tr>\n<tr><td>\u96fb\u8a71\u756a\u53f7\uff08\u65e5\u672c\uff09<\/td><td>0\\d{1,4}-?\\d{1,4}-?\\d{4}<\/td><td>\u56fa\u5b9a\u30fb\u643a\u5e2f\u3092\u5e83\u304f\u30ab\u30d0\u30fc<\/td><\/tr>\n<tr><td>\u90f5\u4fbf\u756a\u53f7<\/td><td>\\d{3}-?\\d{4}<\/td><td>\u30cf\u30a4\u30d5\u30f3\u3042\u308a\u30fb\u306a\u3057\u4e21\u5bfe\u5fdc<\/td><\/tr>\n<tr><td>URL\u306e\u57fa\u672c\u5f62<\/td><td>https?:\/\/[^\\s\"\\']+<\/td><td>http\u3068https\u306eURL<\/td><\/tr>\n<tr><td>\u6570\u5b57\u306e\u307f<\/td><td>^\\d+$<\/td><td>\u6587\u5b57\u5217\u5168\u4f53\u304c\u6570\u5b57\u304b\u3069\u3046\u304b<\/td><\/tr>\n<tr><td>\u82f1\u6570\u5b57\u306e\u307f<\/td><td>^[a-zA-Z0-9]+$<\/td><td>\u82f1\u5b57\u3068\u6570\u5b57\u306e\u307f\u3067\u69cb\u6210<\/td><\/tr>\n<tr><td>\u65e5\u672c\u8a9e\u6587\u5b57\u3092\u542b\u3080<\/td><td>[^\\x00-\\x7F]<\/td><td>ASCII\u4ee5\u5916\uff08\u65e5\u672c\u8a9e\u542b\u3080\uff09<\/td><\/tr>\n<tr><td>HTML\u30bf\u30b0\u306e\u9664\u53bb<\/td><td><[^>]+><\/td><td>\u30bf\u30b0\u90e8\u5206\u306b\u30de\u30c3\u30c1\uff08re.sub\u3067\u7a7a\u767d\u306b\u7f6e\u63db\uff09<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\"><strong>\u30d1\u30bf\u30fc\u30f3\u3092\u8a2d\u8a08<\/strong><br><span style=\"font-size:12px;\">\u4f55\u3092\u62bd\u51fa\u30fb\u691c\u8a3c<br>\u3059\u308b\u304b\u3092\u660e\u78ba\u306b<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>re.compile()\u3067<br>\u30d1\u30bf\u30fc\u30f3\u3092\u4e8b\u524d\u30b3\u30f3\u30d1\u30a4\u30eb<\/strong><br><span style=\"font-size:12px;\">\u7e70\u308a\u8fd4\u3057\u4f7f\u3046\u5834\u5408<br>\u306f\u9ad8\u901f\u5316\u306b\u6709\u52b9<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>match\/search\/<br>fullmatch\/findall<br>\u3092\u9078\u629e<\/strong><br><span style=\"font-size:12px;\">\u7bc4\u56f2\u306b\u5fdc\u3058\u3066<br>\u4f7f\u3044\u5206\u3051\u308b<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>Match\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<br>\u306e\u7d50\u679c\u3092\u53d6\u5f97<\/strong><br><span style=\"font-size:12px;\">group()\u3067<br>\u30de\u30c3\u30c1\u6587\u5b57\u5217\u3092\u53d6\u5f97<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0<\/strong><br><span style=\"font-size:12px;\">None\u30c1\u30a7\u30c3\u30af\u3092<br>\u5fc5\u305a\u884c\u3046<\/span><\/div>\n<\/div>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">re.compile()\u3067\u7e70\u308a\u8fd4\u3057\u30b3\u30f3\u30d1\u30a4\u30eb\u3092\u907f\u3051\u308b<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u540c\u3058\u30d1\u30bf\u30fc\u30f3\u3092\u7e70\u308a\u8fd4\u3057\u4f7f\u3046\u5834\u5408\u306f<code>pattern = re.compile(r\"\\d{4}-\\d{2}-\\d{2}\")<\/code>\u306e\u3088\u3046\u306b\u4e8b\u524d\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304a\u304f\u3068\u3001\u6bce\u56de\u30d1\u30bf\u30fc\u30f3\u6587\u5b57\u5217\u3092\u89e3\u6790\u3059\u308b\u30b3\u30b9\u30c8\u304c\u7701\u3051\u3066\u51e6\u7406\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002\u30eb\u30fc\u30d7\u5185\u3067\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u3046\u5834\u5408\u306f\u3001re.compile()\u3092\u30eb\u30fc\u30d7\u306e\u5916\u3067\u4e00\u5ea6\u3060\u3051\u5b9f\u884c\u3059\u308b\u306e\u304c\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-python-string-compare&#038;blog_slug=cc-python-string-compare\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-python-string-compare&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-05\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">05<\/span>\n  <span class=\"section-label\" style=\"display:block;\">CASE INSENSITIVE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3057\u305f\u6bd4\u8f03\uff08lower\/casefold\uff09<\/span>\n  <span class=\"section-desc\">lower\u30fbupper\u30fbcasefold\u306e\u9055\u3044\u3068\u591a\u8a00\u8a9e\u5bfe\u5fdc\u306e\u8003\u3048\u65b9<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u306e\u691c\u8a3c\u3001URL\u306e\u6b63\u898f\u5316\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u306e\u7a81\u304d\u5408\u308f\u305b\u306a\u3069\u3001<strong>\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u305b\u305a\u306b\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3057\u305f\u3044\u5834\u9762<\/strong>\u306fPython\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u983b\u7e41\u306b\u767b\u5834\u3057\u307e\u3059\u3002Python\u306b\u306f<code>lower()<\/code>\u30fb<code>upper()<\/code>\u30fb<code>casefold()<\/code>\u3068\u3044\u30463\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u7528\u610f\u3055\u308c\u3066\u304a\u308a\u3001\u305d\u308c\u305e\u308c\u7279\u6027\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<table>\n<thead><tr><th>\u30e1\u30bd\u30c3\u30c9<\/th><th>\u52d5\u4f5c<\/th><th>\u5bfe\u8c61<\/th><th>\u591a\u8a00\u8a9e\u5bfe\u5fdc<\/th><th>\u4f7f\u3044\u6240<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>lower()<\/td><td>\u5168\u6587\u5b57\u3092\u5c0f\u6587\u5b57\u306b\u5909\u63db<\/td><td>\u82f1\u5b57<\/td><td>\u9650\u5b9a\u7684\uff08ASCII\u4e3b\u4f53\uff09<\/td><td>\u82f1\u8a9e\u30c6\u30ad\u30b9\u30c8\u306e\u6bd4\u8f03\u306b\u5341\u5206<\/td><\/tr>\n<tr><td>upper()<\/td><td>\u5168\u6587\u5b57\u3092\u5927\u6587\u5b57\u306b\u5909\u63db<\/td><td>\u82f1\u5b57<\/td><td>\u9650\u5b9a\u7684\uff08ASCII\u4e3b\u4f53\uff09<\/td><td>\u5927\u6587\u5b57\u306b\u63c3\u3048\u3066\u6bd4\u8f03\u3059\u308b\u5834\u5408<\/td><\/tr>\n<tr><td>casefold()<\/td><td>\u30b1\u30fc\u30b9\u30d5\u30a9\u30fc\u30eb\u30c9\u5909\u63db\uff08\u3088\u308a\u7a4d\u6975\u7684\u306a\u6b63\u898f\u5316\uff09<\/td><td>\u82f1\u5b57\u30fb\u30c9\u30a4\u30c4\u8a9e\u00df\u7b49<\/td><td>\u5f37\u529b\uff08Unicode\u5bfe\u5fdc\uff09<\/td><td>\u56fd\u969b\u5316\u5bfe\u5fdc\u304c\u5fc5\u8981\u306a\u6587\u5b57\u5217\u6bd4\u8f03\u306b\u6700\u9069<\/td><\/tr>\n<tr><td>swapcase()<\/td><td>\u5927\u6587\u5b57\u3092\u5c0f\u6587\u5b57\u306b\u3001\u5c0f\u6587\u5b57\u3092\u5927\u6587\u5b57\u306b\u53cd\u8ee2<\/td><td>\u82f1\u5b57<\/td><td>\u9650\u5b9a\u7684<\/td><td>\u7279\u6b8a\u306a\u5909\u63db\u51e6\u7406<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">lower()\u3068casefold()\u306e\u6bd4\u8f03<\/div>\n  <p><code># lower()\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/code><br><code>s1 = \"Hello WORLD\"<\/code><br><code>s2 = \"hello world\"<\/code><br><code>print(s1.lower() == s2.lower())  # True<\/code><br><br><code># casefold()\u306f\u591a\u8a00\u8a9e\u6587\u5b57\u3082\u6b63\u898f\u5316\u3059\u308b<\/code><br><code># \u30c9\u30a4\u30c4\u8a9e\u306e\u00df\u306fss\u306b\u5909\u63db\u3055\u308c\u308b<\/code><br><code>german = \"Stra\u00dfe\"<\/code><br><code>print(german.lower())     # \"stra\u00dfe\"\uff08\u03b2\u306f\u5909\u63db\u3055\u308c\u306a\u3044\uff09<\/code><br><code>print(german.casefold())  # \"strasse\"\uff08ss\u306b\u5909\u63db\uff09<\/code><br><br><code># \u5b9f\u7528\u7684\u306a\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u7121\u8996\u306e\u6bd4\u8f03<\/code><br><code>def eq_ignore_case(a, b):<\/code><br><code>    return a.casefold() == b.casefold()<\/code><br><br><code>print(eq_ignore_case(\"Python\", \"python\"))  # True<\/code><br><code>print(eq_ignore_case(\"GENAI\", \"genai\"))    # True<\/code><\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><code>casefold()<\/code>\u306f<code>lower()<\/code>\u3088\u308a\u3082\u7a4d\u6975\u7684\u306a\u6b63\u898f\u5316\u3092\u884c\u3044\u307e\u3059\u3002\u7279\u306b<strong>\u30c9\u30a4\u30c4\u8a9e\u306e\u00df\uff08\u30a8\u30b9\u30c4\u30a7\u30c3\u30c8\uff09\u306e\u3088\u3046\u306a\u6587\u5b57<\/strong>\u3092\u300css\u300d\u306b\u5909\u63db\u3059\u308b\u306a\u3069\u3001Unicode\u898f\u683c\u306b\u5f93\u3063\u305f\u3088\u308a\u53b3\u5bc6\u306a\u30b1\u30fc\u30b9\u6b63\u898f\u5316\u3092\u884c\u3044\u307e\u3059\u3002\u82f1\u8a9e\u306e\u307f\u3092\u6271\u3046\u5834\u5408\u306f<code>lower()<\/code>\u3067\u5341\u5206\u3067\u3059\u304c\u3001\u56fd\u969b\u5316\u5bfe\u5fdc\u304c\u5fc5\u8981\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084\u3001\u8907\u6570\u8a00\u8a9e\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u6271\u3046\u30b7\u30b9\u30c6\u30e0\u3067\u306f<code>casefold()<\/code>\u3092\u4f7f\u3046\u306e\u304c\u5b89\u5168\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u7121\u8996\u306e\u691c\u7d22\u306fre.IGNORECASE\u3082\u4f7f\u3048\u308b<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u6b63\u898f\u8868\u73fe\u3067\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3057\u305f\u691c\u7d22\u3092\u3057\u305f\u3044\u5834\u5408\u306f\u3001<code>re.search(pattern, text, re.IGNORECASE)<\/code>\u307e\u305f\u306f<code>re.search(pattern, text, re.I)<\/code>\u306e\u3088\u3046\u306b\u30d5\u30e9\u30b0\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<code>re.compile(pattern, re.IGNORECASE)<\/code>\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304a\u304f\u65b9\u6cd5\u3082\u53ef\u80fd\u3067\u3059\u3002\u6587\u5b57\u5217\u5168\u4f53\u3092lower()\u306b\u5909\u63db\u3057\u3066\u304b\u3089match\u3059\u308b\u3088\u308a\u3001\u3053\u306e\u30d5\u30e9\u30b0\u3092\u4f7f\u3046\u65b9\u304c\u30b3\u30fc\u30c9\u306e\u610f\u56f3\u304c\u660e\u78ba\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u30d5\u30a9\u30fc\u30e0\u3067\u300c\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3057\u3066\u91cd\u8907\u30c1\u30a7\u30c3\u30af\u3092\u3057\u305f\u3044\u300d\u3068\u3044\u3046\u30b1\u30fc\u30b9\u3067\u306f\u3001DB\u306b\u4fdd\u5b58\u3059\u308b\u3068\u304d\u3068\u6bd4\u8f03\u3059\u308b\u3068\u304d\u306e\u4e21\u65b9\u3067lower()\u307e\u305f\u306fcasefold()\u3092\u9069\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u7247\u65b9\u3060\u3051\u5909\u63db\u3059\u308b\u3068\u3044\u3046\u4e0d\u7d71\u4e00\u306a\u5b9f\u88c5\u3092\u3057\u3066\u3057\u307e\u3046\u3068\u30d0\u30b0\u306b\u306a\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-python-string-compare&#038;blog_slug=cc-python-string-compare\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-python-string-compare&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-06\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">06<\/span>\n  <span class=\"section-label\" style=\"display:block;\">JAPANESE TEXT<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u65e5\u672c\u8a9e\u6587\u5b57\u5217\u30fb\u30de\u30eb\u30c1\u30d0\u30a4\u30c8\u6587\u5b57\u306e\u6bd4\u8f03<\/span>\n  <span class=\"section-desc\">Python3\u306eUnicode\u5bfe\u5fdc\u30fb\u5168\u89d2\u534a\u89d2\u306e\u6271\u3044\u30fbunicodedata\u30e2\u30b8\u30e5\u30fc\u30eb<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Python\u3067\u65e5\u672c\u8a9e\u30c6\u30ad\u30b9\u30c8\u3092\u6271\u3046\u969b\u306e\u6587\u5b57\u5217\u6bd4\u8f03\u306b\u306f\u3001\u82f1\u8a9e\u30c6\u30ad\u30b9\u30c8\u3068\u306f\u7570\u306a\u308b\u6ce8\u610f\u70b9\u304c\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002<strong>Python 3\u306f\u3059\u3079\u3066\u306e\u6587\u5b57\u5217\u3092Unicode\u3067\u7ba1\u7406\u3057\u3066\u3044\u308b<\/strong>\u305f\u3081\u3001\u57fa\u672c\u7684\u306a\u6587\u5b57\u5217\u6bd4\u8f03\u306f\u65e5\u672c\u8a9e\u3067\u3082\u540c\u3058==\u6f14\u7b97\u5b50\u3067\u554f\u984c\u306a\u304f\u52d5\u4f5c\u3057\u307e\u3059\u3002\u3057\u304b\u3057\u3001<strong>\u5168\u89d2\u6587\u5b57\u3068\u534a\u89d2\u6587\u5b57\u306e\u6df7\u5728<\/strong>\u30fb<strong>\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u306e\u9055\u3044<\/strong>\u30fb<strong>\u6587\u5b57\u306e\u6b63\u898f\u5316<\/strong>\u3068\u3044\u3063\u305f\u554f\u984c\u306f\u3001\u65e5\u672c\u8a9e\u7279\u6709\u306e\u96e3\u3057\u3055\u3068\u3057\u3066\u5bfe\u5fdc\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>Unicode\u6b63\u898f\u5316<\/strong>\uff1a\u540c\u3058\u3088\u3046\u306b\u898b\u3048\u3066\u3082\u5185\u90e8\u7684\u306b\u7570\u306a\u308b\u8868\u73fe\u3092\u6301\u3064Unicode\u6587\u5b57\u5217\u3092\u7d71\u4e00\u3059\u308b\u51e6\u7406\u3002NFC\uff08\u5408\u6210\u5f62\u5f0f\uff09\u30fbNFD\uff08\u5206\u89e3\u5f62\u5f0f\uff09\u30fbNFKC\uff08\u4e92\u63db\u5408\u6210\uff09\u30fbNFKD\uff08\u4e92\u63db\u5206\u89e3\uff09\u306e4\u7a2e\u985e\u304c\u3042\u308b\u3002\u5168\u89d2\u534a\u89d2\u306e\u7d71\u4e00\u306b\u306fNFKC\u3092\u4f7f\u3046\u3053\u3068\u304c\u591a\u3044\u3002Python\u3067\u306funicodedata.normalize()\u3067\u5b9f\u884c\u3067\u304d\u308b\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">Python3\u3067\u306e\u65e5\u672c\u8a9e\u6587\u5b57\u5217\u6bd4\u8f03<\/div>\n  <p><code># Python3\u3067\u306f\u6587\u5b57\u5217\u306f\u3059\u3079\u3066Unicode\uff08str\u578b\uff09<\/code><br><code>a = \"Python\u6587\u5b57\u5217\"<\/code><br><code>b = \"Python\u6587\u5b57\u5217\"<\/code><br><code>print(a == b)  # True\uff08\u540c\u3058Unicode\u6587\u5b57\u5217\uff09<\/code><br><br><code># \u5168\u89d2\u3068\u534a\u89d2\u306f\u5225\u306e\u6587\u5b57\u3068\u3057\u3066\u6271\u308f\u308c\u308b<\/code><br><code>print(\"\uff41\" == \"a\")   # False\uff08\u5168\u89d2\u306e\uff41\u3068\u534a\u89d2\u306ea\uff09<\/code><br><code>print(\"\uff11\" == \"1\")   # False\uff08\u5168\u89d2\u306e\uff11\u3068\u534a\u89d2\u306e1\uff09<\/code><br><br><code># \u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u3082\u5225\u306e\u6587\u5b57<\/code><br><code>print(\"\u3042\" == \"\u30a2\")  # False<\/code><br><code>print(\"python\" == \"\uff50\uff59\uff54\uff48\uff4f\uff4e\")  # False\uff08\u5168\u89d2\u82f1\u5b57\uff09<\/code><\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">6-1. \u5168\u89d2\u534a\u89d2\u3092\u6b63\u898f\u5316\u3057\u3066\u304b\u3089\u6bd4\u8f03\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u3067\u306f\u540c\u3058\u5185\u5bb9\u306e\u3064\u3082\u308a\u3067\u3082\u5168\u89d2\u3068\u534a\u89d2\u304c\u6df7\u5728\u3059\u308b\u30b1\u30fc\u30b9\u304c\u591a\u304f\u3001<strong>\u305d\u306e\u307e\u307e==\u3067\u6bd4\u8f03\u3059\u308b\u3068\u4e00\u81f4\u3057\u306a\u3044\u30df\u30b9\u304c\u767a\u751f\u3057\u307e\u3059<\/strong>\u3002\u4f8b\u3048\u3070EC\u30b5\u30a4\u30c8\u306e\u5546\u54c1\u540d\u691c\u7d22\u3067\u300c\uff49\uff30\uff48\uff4f\uff4e\uff45\u300d\uff08\u5168\u89d2\uff09\u3068\u300ciPhone\u300d\uff08\u534a\u89d2\uff09\u3092\u540c\u4e00\u8996\u3057\u305f\u3044\u5834\u5408\u306a\u3069\u3067\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u5834\u5408\u306f\u3001<code>unicodedata.normalize()<\/code>\u3092\u4f7f\u3063\u3066NFKC\u6b63\u898f\u5316\u3092\u884c\u3063\u3066\u304b\u3089\u6bd4\u8f03\u3059\u308b\u306e\u304c\u6b63\u3057\u3044\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">NFKC\u6b63\u898f\u5316\u3067\u5168\u89d2\u534a\u89d2\u3092\u7d71\u4e00\u3059\u308b<\/div>\n  <p><code>import unicodedata<\/code><br><br><code>def normalize_str(s):<\/code><br><code>    \"\"\"\u5168\u89d2\u82f1\u6570\u5b57\u30fb\u8a18\u53f7\u3092\u534a\u89d2\u306b\u7d71\u4e00\u3059\u308bNFKC\u6b63\u898f\u5316\"\"\"<\/code><br><code>    return unicodedata.normalize(\"NFKC\", s)<\/code><br><br><code>s1 = \"\uff49\uff30\uff48\uff4f\uff4e\uff45\"   # \u5168\u89d2\u82f1\u5b57<\/code><br><code>s2 = \"iPhone\"        # \u534a\u89d2\u82f1\u5b57<\/code><br><code>print(s1 == s2)  # False\uff08\u305d\u306e\u307e\u307e\u6bd4\u8f03\uff09<\/code><br><code>print(normalize_str(s1) == normalize_str(s2))  # True\uff08\u6b63\u898f\u5316\u5f8c\uff09<\/code><br><br><code># \u5168\u89d2\u6570\u5b57\u3082\u7d71\u4e00\u3055\u308c\u308b<\/code><br><code>print(normalize_str(\"\uff12\uff10\uff12\uff16\u5e74\") == \"2026\u5e74\")  # True<\/code><br><br><code># \u30ab\u30bf\u30ab\u30ca\u3078\u306e\u5909\u63db\uff08\u3072\u3089\u304c\u306a\u2192\u30ab\u30bf\u30ab\u30ca\u306f\u5225\u51e6\u7406\u304c\u5fc5\u8981\uff09<\/code><br><code>print(normalize_str(\"\u30a2\u30a4\u30a6\u30a8\u30aa\") == \"\u30a2\u30a4\u30a6\u30a8\u30aa\")  # True\uff08\u5168\u89d2\u30ab\u30bf\u30ab\u30ca\u306f\u5909\u308f\u3089\u306a\u3044\uff09<\/code><\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">6-2. unicodedata\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u6587\u5b57\u7a2e\u3092\u5224\u5b9a\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>unicodedata<\/code>\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u306f\u3001\u6587\u5b57\u5217\u6bd4\u8f03\u30fb\u6b63\u898f\u5316\u4ee5\u5916\u306b\u3082\u4fbf\u5229\u306a\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u3002\u7279\u306b<code>unicodedata.category()<\/code>\u3092\u4f7f\u3046\u3068\u3001<strong>\u6587\u5b57\u306e\u30ab\u30c6\u30b4\u30ea\uff08\u6f22\u5b57\u30fb\u3072\u3089\u304c\u306a\u30fb\u6570\u5b57\u30fb\u8a18\u53f7\u306a\u3069\uff09\u3092\u5224\u5b9a<\/strong>\u3067\u304d\u307e\u3059\u3002\u65e5\u672c\u8a9e\u30c6\u30ad\u30b9\u30c8\u3092\u51e6\u7406\u3059\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3001\u6587\u5b57\u7a2e\u3054\u3068\u306b\u7570\u306a\u308b\u51e6\u7406\u3092\u3057\u305f\u3044\u5834\u5408\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">unicodedata\u3067\u6587\u5b57\u7a2e\u3092\u78ba\u8a8d\u3059\u308b<\/div>\n  <p><code>import unicodedata<\/code><br><br><code># \u6587\u5b57\u30ab\u30c6\u30b4\u30ea\u306e\u78ba\u8a8d<\/code><br><code>print(unicodedata.category(\"a\"))   # \"Ll\"\uff08\u5c0f\u6587\u5b57\u82f1\u5b57\uff09<\/code><br><code>print(unicodedata.category(\"A\"))   # \"Lu\"\uff08\u5927\u6587\u5b57\u82f1\u5b57\uff09<\/code><br><code>print(unicodedata.category(\"1\"))   # \"Nd\"\uff08\u5341\u9032\u6570\u5b57\uff09<\/code><br><code>print(unicodedata.category(\"\u3042\"))  # \"Lo\"\uff08\u305d\u306e\u4ed6\u6587\u5b57=\u3072\u3089\u304c\u306a\u7b49\uff09<\/code><br><br><code># \u6587\u5b57\u540d\u306e\u78ba\u8a8d<\/code><br><code>print(unicodedata.name(\"\u3042\"))      # \"HIRAGANA LETTER A\"<\/code><br><code>print(unicodedata.name(\"\u6f22\"))      # \"CJK UNIFIED IDEOGRAPH-6F22\"<\/code><br><br><code># \u65e5\u672c\u8a9e\u6587\u5b57\u304b\u3069\u3046\u304b\u306e\u7c21\u6613\u5224\u5b9a<\/code><br><code>def is_japanese(char):<\/code><br><code>    n = ord(char)<\/code><br><code>    return 0x3000 &lt;= n &lt;= 0x9FFF or 0xFF00 &lt;= n &lt;= 0xFFEF<\/code><br><code>print(is_japanese(\"\u3042\"))  # True<\/code><br><code>print(is_japanese(\"a\"))   # False<\/code><\/p>\n<\/div>\n\n\n\n<div style=\"background:#fef2f2;border:2px solid #dc2626;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:20px;\">&#9888;&#65039;<\/span>\n    <strong style=\"color:#dc2626;font-size:16px;\">\u65e5\u672c\u8a9e\u6587\u5b57\u5217\u306e\u6bd4\u8f03\u3067\u6ce8\u610f\u3059\u3079\u304d5\u3064\u306e\u30dd\u30a4\u30f3\u30c8<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">\u2460\u5168\u89d2\u3068\u534a\u89d2\u3092\u6df7\u540c\u3057\u306a\u3044\uff08NFKC\u6b63\u898f\u5316\u3067\u7d71\u4e00\uff09\u2461\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u306f\u5225\u306e\u6587\u5b57\uff08\u5909\u63db\u304c\u5fc5\u8981\u306a\u3089\u5c02\u7528\u30e9\u30a4\u30d6\u30e9\u30ea\u4f7f\u7528\uff09\u2462\u6f22\u5b57\u306e\u65e7\u5b57\u4f53\u30fb\u65b0\u5b57\u4f53\u306e\u9055\u3044\uff08\u540c\u3058\u300c\u8aad\u307f\u300d\u3067\u3082\u6587\u5b57\u30b3\u30fc\u30c9\u304c\u7570\u306a\u308b\u5834\u5408\u304c\u3042\u308b\uff09\u2463\u6fc1\u70b9\u30fb\u534a\u6fc1\u70b9\u306e\u7d50\u5408\u6587\u5b57\u554f\u984c\uff08NFC\/NFD\u6b63\u898f\u5316\u3067\u5bfe\u5fdc\uff09\u2464\u9577\u97f3\u7b26\uff08\u30fc\uff09\u3068\u4f38\u3070\u3057\u68d2\uff08\u2500\uff09\u306f\u5225\u306e\u6587\u5b57\u3002\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u3092\u53d7\u3051\u4ed8\u3051\u308b\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u6b63\u898f\u5316\u3092\u5fc5\u305a\u884c\u3046\u8a2d\u8a08\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u65e5\u672c\u8a9e\u306e\u540d\u524d\u7167\u5408\uff08\u300c\u5c71\u7530\u592a\u90ce\u300d\u3068\u300c\u5c71\u7530 \u592a\u90ce\u300d\u304c\u540c\u4e00\u4eba\u7269\u304b\u3069\u3046\u304b\u306a\u3069\uff09\u306f\u3001\u30b9\u30da\u30fc\u30b9\u30fb\u5168\u534a\u89d2\u30fb\u8868\u8a18\u3086\u308c\u3092\u542b\u3080\u975e\u5e38\u306b\u8907\u96d1\u306a\u554f\u984c\u3067\u3059\u3002\u4f4f\u6240\u3084\u4eba\u540d\u306e\u7a81\u304d\u5408\u308f\u305b\u306b\u306f\u3001unicodedata\u306b\u3088\u308b\u6b63\u898f\u5316\u306b\u52a0\u3048\u3066\u3001\u5c02\u7528\u306e\u30d5\u30a1\u30b8\u30fc\u30de\u30c3\u30c1\u30f3\u30b0\u30e9\u30a4\u30d6\u30e9\u30ea\uff08fugashi\/jaro-winkler\u7b49\uff09\u306e\u6d3b\u7528\u3082\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-python-string-compare&#038;blog_slug=cc-python-string-compare\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-python-string-compare&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-07\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">07<\/span>\n  <span class=\"section-label\" style=\"display:block;\">BEST PRACTICES<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3068\u3088\u304f\u3042\u308b\u30df\u30b9<\/span>\n  <span class=\"section-desc\">\u578b\u30c1\u30a7\u30c3\u30af\u30fbNone\u6bd4\u8f03\u30fb\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u843d\u3068\u3057\u7a74\u3092\u6574\u7406\u3059\u308b<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Python\u306e\u6587\u5b57\u5217\u6bd4\u8f03\u306f\u4e00\u898b\u30b7\u30f3\u30d7\u30eb\u306b\u898b\u3048\u307e\u3059\u304c\u3001\u5b9f\u52d9\u306e\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u3067\u3088\u304f\u898b\u304b\u3051\u308b<strong>\u5178\u578b\u7684\u306a\u30df\u30b9\u306e\u30d1\u30bf\u30fc\u30f3<\/strong>\u304c\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u305d\u3046\u3057\u305f\u843d\u3068\u3057\u7a74\u3092\u300c\u3084\u3063\u3066\u306f\u3044\u3051\u306a\u3044\u4f8b\u300d\u3068\u300c\u6b63\u3057\u3044\u4f8b\u300d\u3092\u30bb\u30c3\u30c8\u3067\u7d39\u4ecb\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u628a\u63e1\u3057\u3066\u304a\u304f\u3060\u3051\u3067\u3001\u30c7\u30d0\u30c3\u30b0\u306b\u8cbb\u3084\u3059\u6642\u9593\u3092\u5927\u5e45\u306b\u524a\u6e1b\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">7-1. \u578b\u30c1\u30a7\u30c3\u30af\u3092\u5fd8\u308c\u305fTypeError<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u3082\u591a\u3044\u843d\u3068\u3057\u7a74\u306e\u4e00\u3064\u304c\u3001<strong>\u6587\u5b57\u5217\u3068\u6570\u5024\u3092\u6bd4\u8f03\u3057\u3088\u3046\u3068\u3057\u3066TypeError\u304c\u767a\u751f\u3059\u308b\u30b1\u30fc\u30b9<\/strong>\u3067\u3059\u3002Python\u306f\u52d5\u7684\u578b\u4ed8\u3051\u8a00\u8a9e\u306a\u306e\u3067\u3001\u5909\u6570\u306b\u3069\u3093\u306a\u578b\u306e\u5024\u304c\u5165\u3063\u3066\u3044\u308b\u304b\u5b9f\u884c\u6642\u307e\u3067\u5206\u304b\u3089\u306a\u3044\u30b1\u30fc\u30b9\u304c\u3042\u308a\u307e\u3059\u3002\u7279\u306bAPI\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u3084\u3001\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u8aad\u307f\u8fbc\u3093\u3060\u30c7\u30fc\u30bf\u306fstr\u578b\u3067\u6765\u308b\u3053\u3068\u304c\u591a\u304f\u3001\u6574\u6570\u3068\u6bd4\u8f03\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">\u578b\u306e\u4e0d\u4e00\u81f4\u306b\u3088\u308b\u30a8\u30e9\u30fc\u3068\u5bfe\u7b56<\/div>\n  <p><code># \u3088\u304f\u3042\u308b\u30df\u30b9\uff1a\u578b\u3092\u78ba\u8a8d\u305b\u305a\u306b\u6bd4\u8f03\u3059\u308b<\/code><br><code>age = \"25\"  # API\u304b\u3089\u53d6\u5f97\u3057\u305f\u5024\u306fstr\u578b<\/code><br><code>if age &gt;= 18:  # TypeError: \">=\" not supported between \"str\" and \"int\"<\/code><br><code>    print(\"\u6210\u4eba\u3067\u3059\")<\/code><br><br><code># \u6b63\u3057\u3044\u5bfe\u5fdc\uff1a\u6bd4\u8f03\u524d\u306b\u578b\u5909\u63db\u3059\u308b<\/code><br><code>if int(age) &gt;= 18:<\/code><br><code>    print(\"\u6210\u4eba\u3067\u3059\")<\/code><br><br><code># \u3088\u308a\u5b89\u5168\u306a\u5bfe\u5fdc\uff1a\u578b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304b\u3089\u5909\u63db<\/code><br><code>if isinstance(age, str) and age.isdigit():<\/code><br><code>    if int(age) &gt;= 18:<\/code><br><code>        print(\"\u6210\u4eba\u3067\u3059\")<\/code><br><code>else:<\/code><br><code>    print(\"\u5e74\u9f62\u306e\u5f62\u5f0f\u304c\u4e0d\u6b63\u3067\u3059\")<\/code><\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">7-2. None\u3068\u306e\u6bd4\u8f03\u30df\u30b9<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306eNULL\u5024\u3001API\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u30d1\u30e9\u30e1\u30fc\u30bf\u3001\u8f9e\u66f8\u306e\u5b58\u5728\u3057\u306a\u3044\u30ad\u30fc\u306e\u5024\u306a\u3069\u3001<strong>None\u304c\u5165\u3063\u3066\u304f\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u5909\u6570\u3092\u6bd4\u8f03\u3059\u308b\u524d\u306b\u3001None\u30c1\u30a7\u30c3\u30af\u3092\u5fd8\u308c\u308b\u30df\u30b9<\/strong>\u3082\u983b\u51fa\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002None\u306b\u306fAttributeError\u3084TypeError\u304c\u767a\u751f\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3084\u306e\u6f14\u7b97\u304c\u591a\u3044\u305f\u3081\u3001\u65e9\u671f\u306bNone\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">None\u304c\u5165\u3063\u3066\u3044\u308b\u3068\u304d\u306eAttributeError<\/div>\n  <p><code># \u3088\u304f\u3042\u308b\u30df\u30b9\uff1aNone\u30c1\u30a7\u30c3\u30af\u306a\u3057\u3067\u6587\u5b57\u5217\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3076<\/code><br><code>def get_username():  # \u672a\u30ed\u30b0\u30a4\u30f3\u306e\u3068\u304dNone\u3092\u8fd4\u3059\u95a2\u6570<\/code><br><code>    return None<\/code><br><br><code>name = get_username()<\/code><br><code>if name.lower() == \"admin\":  # AttributeError: \"NoneType\" has no attribute \"lower\"<\/code><br><code>    print(\"\u7ba1\u7406\u8005\u3067\u3059\")<\/code><br><br><code># \u6b63\u3057\u3044\u5bfe\u5fdc\uff1ais None \u30c1\u30a7\u30c3\u30af\u3092\u5148\u306b\u884c\u3046<\/code><br><code>if name is not None and name.lower() == \"admin\":<\/code><br><code>    print(\"\u7ba1\u7406\u8005\u3067\u3059\")<\/code><br><br><code># \u307e\u305f\u306for\u3067\u77ed\u7d61\u8a55\u4fa1\u3092\u4f7f\u3046\u65b9\u6cd5<\/code><br><code>if (name or \"\").lower() == \"admin\":<\/code><br><code>    print(\"\u7ba1\u7406\u8005\u3067\u3059\")<\/code><\/p>\n<\/div>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u578b\u5909\u63db\u306f\u5fc5\u305a\u6bd4\u8f03\u524d\u306b\u884c\u3046<\/strong>\uff1astr\u578b\u3068\u6570\u5024\u578b\u306e\u76f4\u63a5\u6bd4\u8f03\u306fTypeError\u306b\u306a\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>is\u306fNone\u30fbTrue\u30fbFalse\u306e\u307f\u306b\u4f7f\u3046<\/strong>\uff1a\u6587\u5b57\u5217\u6bd4\u8f03\u306b\u306f\u5fc5\u305a==\u3092\u4f7f\u3046<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>None\u30c1\u30a7\u30c3\u30af\u306f\u6700\u521d\u306b\u884c\u3046<\/strong>\uff1aNone\u306b\u5bfe\u3057\u3066\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3076\u3068AttributeError\u304c\u767a\u751f\u3059\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306f\u6bd4\u8f03\u524d\u306b\u7d71\u4e00\u3059\u308b<\/strong>\uff1acasefold()\u307e\u305f\u306flower()\u3092\u4e21\u8fba\u306b\u9069\u7528\u3059\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u5168\u89d2\u534a\u89d2\u304c\u6df7\u5728\u3059\u308b\u30c7\u30fc\u30bf\u306fNFKC\u6b63\u898f\u5316\u3059\u308b<\/strong>\uff1a\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u3067\u306f\u7279\u306b\u91cd\u8981<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u6b63\u898f\u8868\u73fe\u30d1\u30bf\u30fc\u30f3\u306fre.compile()\u3067\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b<\/strong>\uff1a\u30eb\u30fc\u30d7\u5185\u3067\u6bce\u56de\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u306a\u3044<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u6570\u5024\u3092\u542b\u3080\u6587\u5b57\u5217\u306e\u5927\u5c0f\u6bd4\u8f03\u306f\u5909\u63db\u3057\u3066\u304b\u3089\u884c\u3046<\/strong>\uff1a\"10\" > \"9\"\u306fFalse\u306b\u306a\u308b\u7f60\u304c\u3042\u308b<\/span><\/div>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">7-3. \u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u89b3\u70b9\u3067\u306e\u4f7f\u3044\u5206\u3051<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u5834\u5408\u3001\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u65b9\u6cd5\u306b\u3088\u3063\u3066\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u5dee\u304c\u51fa\u307e\u3059\u3002\u7c21\u5358\u306a\u30ac\u30a4\u30c9\u30e9\u30a4\u30f3\u3068\u3057\u3066\u3001<strong>\u51e6\u7406\u901f\u5ea6\u306e\u89b3\u70b9\u304b\u3089\u306f==\u304c\u6700\u901f\u3001in\u304c\u4e2d\u7a0b\u5ea6\u3001\u6b63\u898f\u8868\u73fere.search\u304c\u6700\u3082\u91cd\u3044<\/strong>\u3068\u3044\u3046\u4e00\u822c\u7684\u306a\u50be\u5411\u304c\u3042\u308a\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u5b9f\u969b\u306e\u901f\u5ea6\u5dee\u306f\u30c7\u30fc\u30bf\u91cf\u30fb\u30d1\u30bf\u30fc\u30f3\u306e\u8907\u96d1\u3055\u30fb\u30de\u30c3\u30c1\u7387\u306b\u3088\u3063\u3066\u5927\u304d\u304f\u5909\u308f\u308b\u305f\u3081\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u554f\u984c\u306b\u306a\u308b\u5834\u5408\u306f\u5b9f\u969b\u306b\u8a08\u6e2c\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fef2f2;border:2px solid #dc2626;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:20px;\">&#9888;&#65039;<\/span>\n    <strong style=\"color:#dc2626;font-size:16px;\">\u6b63\u898f\u8868\u73fe\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u3092\u30eb\u30fc\u30d7\u5185\u3067\u884c\u308f\u306a\u3044<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">for\/while\u30eb\u30fc\u30d7\u306e\u4e2d\u3067re.match(pattern, ...)\u306e\u3088\u3046\u306b\u30d1\u30bf\u30fc\u30f3\u6587\u5b57\u5217\u3092\u6bce\u56de\u6e21\u3059\u3068\u3001\u30eb\u30fc\u30d7\u306e\u7e70\u308a\u8fd4\u3057\u306e\u305f\u3073\u306b\u30d1\u30bf\u30fc\u30f3\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002\u5b9f\u306fPython\u306f\u6700\u8fd1\u30a2\u30af\u30bb\u30b9\u3057\u305f\u30d1\u30bf\u30fc\u30f3\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u3066\u3044\u308b\u306e\u3067\u5c0f\u898f\u6a21\u3067\u306f\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u591a\u304f\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u4f7f\u3044\u56de\u3059\u5834\u5408\u306fpattern = re.compile(...)\u3092\u30eb\u30fc\u30d7\u306e\u5916\u3067\u4e00\u5ea6\u3060\u3051\u5b9f\u884c\u3059\u308b\u7fd2\u6163\u3092\u3064\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-python-string-compare&#038;blog_slug=cc-python-string-compare\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-python-string-compare&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-08\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">08<\/span>\n  <span class=\"section-label\" style=\"display:block;\">CLAUDE CODE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u3010Claude Code\u6d3b\u7528\u3011\u6587\u5b57\u5217\u51e6\u7406\u30b3\u30fc\u30c9\u306e\u81ea\u52d5\u751f\u6210<\/span>\n  <span class=\"section-desc\">\u30bf\u30fc\u30df\u30ca\u30ebAI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3067\u8907\u96d1\u306a\u6587\u5b57\u5217\u51e6\u7406\u3092\u4e00\u767a\u3067\u66f8\u304b\u305b\u308b<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u307e\u3067Python\u306e\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u5168\u30d1\u30bf\u30fc\u30f3\u3092\u89e3\u8aac\u3057\u3066\u304d\u307e\u3057\u305f\u3002\u7406\u89e3\u3067\u304d\u3066\u3082\u3001\u5b9f\u969b\u306b\u6b63\u3057\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u306e\u306b\u306f\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002\u7279\u306b<strong>\u6b63\u898f\u8868\u73fe\u306e\u30d1\u30bf\u30fc\u30f3\u8a2d\u8a08<\/strong>\u3084<strong>\u5168\u89d2\u534a\u89d2\u6b63\u898f\u5316\u306e\u5b9f\u88c5<\/strong>\u3001<strong>\u578b\u30c1\u30a7\u30c3\u30af\u3092\u542b\u3080\u5805\u7262\u306a\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3<\/strong>\u306f\u3001\u7d4c\u9a13\u306e\u3042\u308b\u958b\u767a\u8005\u3067\u3082\u300c\u30d1\u30c3\u3068\u66f8\u3051\u306a\u3044\u300d\u3053\u3068\u304c\u591a\u3044\u9818\u57df\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u3053\u3067\u6d3b\u7528\u3057\u305f\u3044\u306e\u304c<strong>Claude Code<\/strong>\u3067\u3059\u3002Claude Code\u306f\u30bf\u30fc\u30df\u30ca\u30eb\uff08\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\uff09\u4e0a\u3067\u52d5\u304fAnthropic\u306eAI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3067\u3001\u81ea\u7136\u8a00\u8a9e\u3067\u6307\u793a\u3059\u308b\u3060\u3051\u3067\u6587\u5b57\u5217\u51e6\u7406\u30b3\u30fc\u30c9\u3092\u4e00\u767a\u3067\u751f\u6210\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u30b3\u30fc\u30c9\u751f\u6210\u3060\u3051\u3067\u306a\u304f\u3001\u65e2\u5b58\u30b3\u30fc\u30c9\u306e\u30c7\u30d0\u30c3\u30b0\u30fb\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u30fb\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u751f\u6210\u307e\u3067\u4e00\u6c17\u901a\u8cab\u3067\u4efb\u305b\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">Claude Code\u3092\u4f7f\u3046\u524d\u306f\u3001\u6b63\u898f\u8868\u73fe\u3092\u66f8\u304f\u305f\u3073\u306bStack Overflow\u3092\u8abf\u3079\u3066\u3001\u30b3\u30d4\u30da\u3057\u3066\u3001\u52d5\u4f5c\u78ba\u8a8d\u3057\u3066\u2026\u2026\u3068\u3044\u3046\u6d41\u308c\u306730\u5206\u304b\u304b\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u4eca\u306f\u300c\u96fb\u8a71\u756a\u53f7\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u95a2\u6570\u3092\u66f8\u3044\u3066\u3001\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3068\u30c6\u30b9\u30c8\u3082\u542b\u3081\u3066\u300d\u3068\u4e00\u884c\u6307\u793a\u3059\u308b\u3060\u3051\u30672\u301c3\u5206\u3067\u5b8c\u6210\u5f62\u304c\u51fa\u3066\u304d\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">8-1. Claude Code\u3078\u306e\u6587\u5b57\u5217\u51e6\u7406\u6307\u793a\u306e\u4f8b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Claude Code\u306f\u81ea\u7136\u8a00\u8a9e\u306e\u6307\u793a\u3067\u52d5\u304f\u305f\u3081\u3001\u300c\u3069\u3093\u306a\u6587\u5b57\u5217\u6bd4\u8f03\u3092\u3057\u305f\u3044\u304b\u300d\u3092\u65e5\u672c\u8a9e\u3067\u8aac\u660e\u3059\u308b\u3060\u3051\u3067\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u5178\u578b\u7684\u306a\u6307\u793a\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<table>\n<thead><tr><th>\u3084\u308a\u305f\u3044\u3053\u3068<\/th><th>Claude Code\u3078\u306e\u6307\u793a\u4f8b<\/th><th>\u51fa\u529b\u3055\u308c\u308b\u3082\u306e<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u691c\u8a3c<\/td><td>\u300c\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u5f62\u5f0f\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308bPython\u95a2\u6570\u3092\u66f8\u3044\u3066\u3002re.fullmatch\u3092\u4f7f\u3044\u3001\u4e0d\u6b63\u306a\u5834\u5408\u306fValueError\u3092\u767a\u751f\u3055\u305b\u308b\u3002\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u30825\u3064\u66f8\u3044\u3066\u300d<\/td><td>\u95a2\u6570\u5b9a\u7fa9+docstring+5\u3064\u306e\u30c6\u30b9\u30c8<\/td><\/tr>\n<tr><td>\u5168\u89d2\u534a\u89d2\u6b63\u898f\u5316<\/td><td>\u300c\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u306e\u6587\u5b57\u5217\u3092\u6b63\u898f\u5316\u3059\u308b\u95a2\u6570\u3092\u4f5c\u3063\u3066\u3002NFKC\u6b63\u898f\u5316+\u524d\u5f8c\u306e\u7a7a\u767d\u9664\u53bb+\u9023\u7d9a\u30b9\u30da\u30fc\u30b9\u306e\u5727\u7e2e\u3092\u884c\u3046\u3002unicodedata\u3092\u4f7f\u3046\u300d<\/td><td>\u6b63\u898f\u5316\u95a2\u6570+\u4f7f\u7528\u4f8b<\/td><\/tr>\n<tr><td>\u96fb\u8a71\u756a\u53f7\u62bd\u51fa<\/td><td>\u300c\u30c6\u30ad\u30b9\u30c8\u304b\u3089\u65e5\u672c\u306e\u96fb\u8a71\u756a\u53f7\uff08\u56fa\u5b9a\u30fb\u643a\u5e2f\u30fb\u30d5\u30ea\u30fc\u30c0\u30a4\u30e4\u30eb\uff09\u3092\u5168\u4ef6\u62bd\u51fa\u3059\u308b\u95a2\u6570\u3092\u4f5c\u3063\u3066\u3002re.findall\u3092\u4f7f\u3044\u3001\u30cf\u30a4\u30d5\u30f3\u3042\u308a\u30fb\u306a\u3057\u4e21\u5bfe\u5fdc\u300d<\/td><td>\u62bd\u51fa\u95a2\u6570+\u6b63\u898f\u8868\u73fe\u30d1\u30bf\u30fc\u30f3<\/td><\/tr>\n<tr><td>\u30d5\u30a1\u30b8\u30fc\u30de\u30c3\u30c1\u30f3\u30b0<\/td><td>\u300c2\u3064\u306e\u6587\u5b57\u5217\u306e\u985e\u4f3c\u5ea6\u3092Levenshtein\u8ddd\u96e2\u3067\u8a08\u7b97\u3059\u308b\u95a2\u6570\u3092\u66f8\u3044\u3066\u3002\u5916\u90e8\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u3057\u3067\u5b9f\u88c5\u300d<\/td><td>\u8ddd\u96e2\u8a08\u7b97\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u5b8c\u5168\u5b9f\u88c5<\/td><\/tr>\n<tr><td>\u30ed\u30b0\u89e3\u6790<\/td><td>\u300cApache\u30a2\u30af\u30bb\u30b9\u30ed\u30b0\u304b\u3089\u7279\u5b9a\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9\uff084xx\u30fb5xx\uff09\u306e\u884c\u3060\u3051\u62bd\u51fa\u3059\u308b\u95a2\u6570\u3092\u66f8\u3044\u3066\u3002\u6b63\u898f\u8868\u73fe\u3067\u5b9f\u88c5\u300d<\/td><td>\u30ed\u30b0\u30d1\u30fc\u30b5\u30fc\u95a2\u6570+\u4f7f\u7528\u4f8b<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<h3 class=\"wp-block-heading\">8-2. Claude Code\u304c\u51fa\u529b\u3059\u308b\u30b3\u30fc\u30c9\u306e\u54c1\u8cea<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Claude Code\u304c\u751f\u6210\u3059\u308b\u30b3\u30fc\u30c9\u306f\u5358\u306a\u308b\u300c\u52d5\u304f\u30b3\u30fc\u30c9\u300d\u3067\u306f\u306a\u304f\u3001<strong>\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u30fb\u578b\u30d2\u30f3\u30c8\u30fbdocstring\u30fb\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9<\/strong>\u307e\u3067\u542b\u3081\u305f\u672c\u756a\u30ec\u30d9\u30eb\u306e\u54c1\u8cea\u3067\u51fa\u529b\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6307\u793a\u3092\u3059\u308b\u3068\u3088\u308a\u826f\u3044\u51fa\u529b\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"point-box\">\n  <div class=\"point-title\">\u54c1\u8cea\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3055\u305b\u308b\u6307\u793a\u306e\u30b3\u30c4<\/div>\n  <p># \u578b\u30d2\u30f3\u30c8\u3092\u542b\u3081\u308b\u3088\u3046\u6307\u793a<br>\"Python\u306e\u578b\u30d2\u30f3\u30c8\uff08str, Optional[str], list[str]\u7b49\uff09\u3092\u4ed8\u3051\u3066\u66f8\u3044\u3066\"<br><br># \u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3092\u542b\u3081\u308b\u3088\u3046\u6307\u793a<br>\"None\u30fb\u7a7a\u6587\u5b57\u5217\u30fb\u6570\u5024\u578b\u304c\u6e21\u3055\u308c\u305f\u5834\u5408\u306e\u51e6\u7406\u3082\u542b\u3081\u3066\"<br><br># \u30c6\u30b9\u30c8\u3092\u540c\u6642\u306b\u751f\u6210\u3055\u305b\u308b<br>\"pytest\u306e\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3092\u6b63\u5e38\u7cfb\u30fb\u7570\u5e38\u7cfb\u30fb\u5883\u754c\u5024\u3067\u54043\u3064\u4f5c\u3063\u3066\"<br><br># \u8aac\u660e\u3082\u6c42\u3081\u308b<br>\"\u5b9f\u88c5\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u30b3\u30e1\u30f3\u30c8\u3067\u89e3\u8aac\u3057\u3066\u3002\u7279\u306b\u6b63\u898f\u8868\u73fe\u30d1\u30bf\u30fc\u30f3\u306e\u610f\u5473\u3092\"<br><br># \u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3082\u8003\u616e<br>\"\u5927\u91cf\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u524d\u63d0\u3067\u3001re.compile()\u3092\u4f7f\u3063\u3066\u6700\u9069\u5316\u3057\u3066\"<\/p>\n<\/div>\n\n\n\n<div style=\"background:linear-gradient(135deg,#1a1a1a,#2a1015);border-radius:12px;padding:20px 24px;margin:24px 0;display:flex;align-items:center;gap:16px;color:#fff;\">\n  <span style=\"font-size:36px;\">&#127942;<\/span>\n  <div>\n    <div style=\"font-size:13px;color:#dc2626;font-weight:700;letter-spacing:1px;\">VERDICT<\/div>\n    <div style=\"font-size:18px;font-weight:800;\">Claude \u306b\u8ecd\u914d<\/div>\n    <div style=\"font-size:14px;color:rgba(255,255,255,0.7);margin-top:4px;\">\u6b63\u898f\u8868\u73fe\u3084\u6587\u5b57\u5217\u51e6\u7406\u306e\u30b3\u30fc\u30c9\u306fClaude Code\u3078\u306e\u81ea\u7136\u8a00\u8a9e\u6307\u793a\u3067\u5373\u751f\u6210\u3002\u8a2d\u8a08\u30fb\u5b9f\u88c5\u30fb\u30c6\u30b9\u30c8\u307e\u3067\u4e00\u6c17\u901a\u8cab\u3067\u4efb\u305b\u3089\u308c\u308b\u3002<\/div>\n  <\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">8-3. \u6587\u5b57\u5217\u51e6\u7406\u306e\u30c7\u30d0\u30c3\u30b0\u3082Claude Code\u306b\u4efb\u305b\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e2\u5b58\u306e\u30b3\u30fc\u30c9\u306b\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u30d0\u30b0\u304c\u6f5c\u3093\u3067\u3044\u308b\u5834\u5408\u3082\u3001Claude Code\u304c\u52a9\u3051\u3066\u304f\u308c\u307e\u3059\u3002<strong>\u300c\u3053\u306e\u30b3\u30fc\u30c9\u306e\u6587\u5b57\u5217\u6bd4\u8f03\u306b\u554f\u984c\u304c\u3042\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u300d<\/strong>\u3068\u6307\u793a\u3059\u308b\u3060\u3051\u3067\u3001is\u3068==\u306e\u6df7\u540c\u30fb\u578b\u5909\u63db\u6f0f\u308c\u30fbNone\u30c1\u30a7\u30c3\u30af\u5fd8\u308c\u30fb\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u53d6\u308a\u6271\u3044\u30df\u30b9\u306a\u3069\u3092\u81ea\u52d5\u3067\u691c\u51fa\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\"><strong>\u30d0\u30b0\u306e\u3042\u308b<br>\u6587\u5b57\u5217\u51e6\u7406\u30b3\u30fc\u30c9\u3092<br>\u8cbc\u308a\u4ed8\u3051\u308b<\/strong><br><span style=\"font-size:12px;\">\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u3067\u3082<br>\u30b3\u30fc\u30c9\u30da\u30fc\u30b9\u30c8\u3067\u3082\u53ef<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>Claude Code\u306b<br>\u300c\u554f\u984c\u3092\u898b\u3064\u3051\u3066<br>\u4fee\u6b63\u3057\u3066\u300d\u3068\u6307\u793a<\/strong><br><span style=\"font-size:12px;\">\u5177\u4f53\u7684\u306a\u75c7\u72b6\u3092<br>\u6dfb\u3048\u308b\u3068\u7cbe\u5ea6UP<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>\u4fee\u6b63\u5019\u88dc\u3092<br>\u63d0\u793a\u3057\u3066\u304f\u308c\u308b<\/strong><br><span style=\"font-size:12px;\">\u7406\u7531\u306e\u8aac\u660e\u4ed8\u304d\u3067<br>\u5206\u304b\u308a\u3084\u3059\u3044<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3082<br>\u81ea\u52d5\u751f\u6210<\/strong><br><span style=\"font-size:12px;\">\u4fee\u6b63\u304c\u6b63\u3057\u3044\u3053\u3068\u3092<br>\u78ba\u8a8d\u3067\u304d\u308b<\/span><\/div>\n<\/div>\n\n\n\n<div style=\"background:linear-gradient(135deg,#1a1a1a,#2a1015);border-radius:12px;padding:20px 24px;margin:24px 0;display:flex;align-items:center;gap:16px;color:#fff;\">\n  <span style=\"font-size:36px;\">&#127942;<\/span>\n  <div>\n    <div style=\"font-size:13px;color:#dc2626;font-weight:700;letter-spacing:1px;\">VERDICT<\/div>\n    <div style=\"font-size:18px;font-weight:800;\">Claude \u306b\u8ecd\u914d<\/div>\n    <div style=\"font-size:14px;color:rgba(255,255,255,0.7);margin-top:4px;\">\u6587\u5b57\u5217\u51e6\u7406\u306e\u30c7\u30d0\u30c3\u30b0\u306b\u304b\u304b\u308b\u6642\u9593\u3092Claude Code\u30671\/5\u4ee5\u4e0b\u306b\u5727\u7e2e\u3067\u304d\u308b\u3002\u300c\u306a\u305c\u30d0\u30b0\u304c\u8d77\u304d\u3066\u3044\u308b\u304b\u300d\u306e\u8aac\u660e\u4ed8\u304d\u3067\u5b66\u7fd2\u306b\u3082\u306a\u308b\u3002<\/div>\n  <\/div>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u7279\u306bNone\u30c1\u30a7\u30c3\u30af\u6f0f\u308c\u3084\u3001\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u53d6\u308a\u6271\u3044\u30df\u30b9\u306f\u3001\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u3067\u898b\u843d\u3068\u3057\u3084\u3059\u3044\u7a2e\u985e\u306e\u30d0\u30b0\u3067\u3059\u3002Claude Code\u306b\u300c\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3068\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306e\u89b3\u70b9\u3067\u3053\u306e\u30b3\u30fc\u30c9\u3092\u898b\u76f4\u3057\u3066\u300d\u3068\u6307\u793a\u3059\u308b\u3060\u3051\u3067\u3001\u4eba\u9593\u306e\u30ec\u30d3\u30e5\u30fc\u3088\u308a\u7d20\u65e9\u304f\u5305\u62ec\u7684\u306a\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-python-string-compare&#038;blog_slug=cc-python-string-compare\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-python-string-compare&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-09\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">09<\/span>\n  <span class=\"section-label\" style=\"display:block;\">GENAI CASE STUDY<\/span>\n  <span class=\"section-title\" style=\"display:block;\">GENAI\u5b9f\u904b\u7528\u30c7\u30fc\u30bf<\/span>\n  <span class=\"section-desc\">Claude Code\u3067\u6587\u5b57\u5217\u51e6\u7406\u30fb\u30c7\u30fc\u30bf\u691c\u8a3c\u30b3\u30fc\u30c9\u3092\u5b9f\u969b\u306b\u91cf\u7523\u3057\u3066\u3044\u308b\u5b9f\u614b<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u3067\u306f\u3001\u5f0a\u793e\uff08\u682a\u5f0f\u4f1a\u793eGENAI\uff09\u304cClaude Code\u3092\u4f7f\u3063\u3066Python\u306e\u6587\u5b57\u5217\u51e6\u7406\u30b3\u30fc\u30c9\u3092\u5b9f\u969b\u306b\u91cf\u7523\u3057\u3066\u3044\u308b\u5b9f\u614b\u3092\u304a\u4f1d\u3048\u3057\u307e\u3059\u3002\u300c\u81ea\u793e\u30b5\u30fc\u30d3\u30b9\u958b\u767a\u3067\u3069\u306e\u7a0b\u5ea6Claude Code\u306b\u4efb\u305b\u3066\u3044\u308b\u306e\u304b\u300d\u300c\u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u3082\u6587\u5b57\u5217\u51e6\u7406\u30b3\u30fc\u30c9\u3092\u66f8\u304b\u305b\u3089\u308c\u308b\u306e\u304b\u300d\u3092\u5177\u4f53\u7684\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<table>\n<thead><tr><th>\u7528\u9014<\/th><th>\u5f93\u6765\u306e\u958b\u767a\u6642\u9593<\/th><th>Claude Code\u6d3b\u7528\u5f8c<\/th><th>\u524a\u6e1b\u7387<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>\u30e1\u30fc\u30eb\u30fb\u96fb\u8a71\u756a\u53f7\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u95a2\u6570<\/td><td>2\u301c3\u6642\u9593\uff08\u8abf\u67fb+\u5b9f\u88c5+\u30c6\u30b9\u30c8\uff09<\/td><td>15\u301c30\u5206\uff08\u6307\u793a+\u30ec\u30d3\u30e5\u30fc+\u5fae\u4fee\u6b63\uff09<\/td><td>85%\u524a\u6e1b<\/td><\/tr>\n<tr><td>\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u7279\u5b9a\u30d1\u30bf\u30fc\u30f3\u62bd\u51fa<\/td><td>1\u301c2\u6642\u9593\uff08\u6b63\u898f\u8868\u73fe\u8a2d\u8a08\uff09<\/td><td>10\u301c20\u5206<\/td><td>80%\u524a\u6e1b<\/td><\/tr>\n<tr><td>\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u306e\u5168\u89d2\u534a\u89d2\u6b63\u898f\u5316\u51e6\u7406<\/td><td>2\u6642\u9593\uff08unicodedata\u8abf\u67fb\uff09<\/td><td>15\u5206<\/td><td>87%\u524a\u6e1b<\/td><\/tr>\n<tr><td>CSV\u30c7\u30fc\u30bf\u306e\u6587\u5b57\u5217\u30af\u30ec\u30f3\u30b8\u30f3\u30b0<\/td><td>3\u301c4\u6642\u9593\uff08\u30b1\u30fc\u30b9\u6d17\u3044\u51fa\u3057\uff09<\/td><td>30\u301c45\u5206<\/td><td>85%\u524a\u6e1b<\/td><\/tr>\n<tr><td>\u591a\u8a00\u8a9e\u5bfe\u5fdc\u306e\u6587\u5b57\u5217\u6bd4\u8f03\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3<\/td><td>\u4e381\u65e5<\/td><td>1\u301c2\u6642\u9593<\/td><td>80%\u524a\u6e1b<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u8a18\u306e\u6570\u5024\u304b\u3089\u5206\u304b\u308b\u3088\u3046\u306b\u3001\u6587\u5b57\u5217\u51e6\u7406\u30b3\u30fc\u30c9\u306e\u958b\u767a\u306fClaude Code\u306b\u3088\u3063\u3066<strong>\u5e73\u5747\u3057\u306680\u301c87%\u306e\u6642\u9593\u524a\u6e1b<\/strong>\u304c\u5b9f\u73fe\u3067\u304d\u3066\u3044\u307e\u3059\u3002\u7279\u306b\u6b63\u898f\u8868\u73fe\u306e\u30d1\u30bf\u30fc\u30f3\u8a2d\u8a08\u3084unicode\u30c7\u30fc\u30bf\u306e\u6271\u3044\u306a\u3069\u3001\u300c\u4ed5\u69d8\u306f\u5206\u304b\u308b\u304c\u5b9f\u88c5\u306b\u8a70\u307e\u308a\u3084\u3059\u3044\u300d\u9818\u57df\u3067\u306e\u52b9\u679c\u304c\u9855\u8457\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f0a\u793e\u3067\u306f\u975e\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30e1\u30f3\u30d0\u30fc\u3082\u3001Claude Code\u3078\u306e\u81ea\u7136\u8a00\u8a9e\u6307\u793a\u306b\u3088\u3063\u3066\u7c21\u5358\u306a\u6587\u5b57\u5217\u51e6\u7406\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u81ea\u524d\u3067\u4f5c\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u300c\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u30ea\u30b9\u30c8\u304b\u3089\u91cd\u8907\u3092\u9664\u3044\u3066\u3001\u30d5\u30ea\u30fc\u30e1\u30fc\u30eb\u306e\u30c9\u30e1\u30a4\u30f3\u3092\u9664\u5916\u3057\u3066\u3001CSV\u51fa\u529b\u3057\u3066\u300d\u3068\u3044\u3046\u3088\u3046\u306a\u6307\u793a\u3092\u65e5\u672c\u8a9e\u3067Claude Code\u306b\u6e21\u3059\u3068\u3001\u5b9f\u884c\u53ef\u80fd\u306aPython\u30b9\u30af\u30ea\u30d7\u30c8\u304c10\u5206\u4ee5\u5185\u306b\u5b8c\u6210\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u3092\u66f8\u3051\u306a\u3044\u4eba\u3067\u3082\u3001\u300c\u3069\u3046\u3044\u3046\u51e6\u7406\u3092\u3057\u305f\u3044\u304b\u300d\u3092\u8a00\u8a9e\u5316\u3067\u304d\u308c\u3070\u81ea\u52d5\u5316\u304c\u5b9f\u73fe\u3067\u304d\u308b\u6642\u4ee3\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">Claude Code\u306e\u6700\u5927\u306e\u5f37\u307f\u306f\u300c\u30b3\u30fc\u30c9\u306e\u80cc\u666f\u8aac\u660e\u307e\u3067\u4e00\u7dd2\u306b\u6559\u3048\u3066\u304f\u308c\u308b\u300d\u70b9\u3067\u3059\u3002\u751f\u6210\u3055\u308c\u305f\u30b3\u30fc\u30c9\u306b\u300c\u306a\u305c\u6b63\u898f\u8868\u73fe\u3067\u3053\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u4f7f\u3046\u306e\u304b\u300d\u300c\u306a\u305c\u3053\u3053\u3067casefold()\u3092\u4f7f\u3046\u306e\u304b\u300d\u3068\u3044\u3046\u30b3\u30e1\u30f3\u30c8\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u53d7\u3051\u53d6\u3063\u305f\u4eba\u304c\u30b3\u30fc\u30c9\u3092\u8aad\u3093\u3067\u5b66\u7fd2\u3067\u304d\u308b\u526f\u6b21\u52b9\u679c\u3082\u3042\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-python-string-compare&#038;blog_slug=cc-python-string-compare\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-python-string-compare&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<div id=\"sec-10\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">10<\/span>\n  <span class=\"section-label\" style=\"display:block;\">CONCLUSION<\/span>\n  <span class=\"section-title\" style=\"display:block;\">Python\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u9078\u3073\u65b9\u307e\u3068\u3081<\/span>\n  <span class=\"section-desc\">\u6f14\u7b97\u5b50\u30fb\u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u3044\u5206\u3051\u30c1\u30fc\u30c8\u30b7\u30fc\u30c8\u3068\u6b21\u306e\u30a2\u30af\u30b7\u30e7\u30f3<\/span>\n<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Python\u306e\u6587\u5b57\u5217\u6bd4\u8f03\u306b\u95a2\u3059\u308b9\u3064\u306e\u4e3b\u8981\u30c8\u30d4\u30c3\u30af\u3092\u5fb9\u5e95\u7684\u306b\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002\u305d\u308c\u305e\u308c\u306e\u7279\u5fb4\u3068\u4f7f\u3044\u3069\u3053\u308d\u3092\u6b63\u78ba\u306b\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u30d0\u30b0\u304c\u5c11\u306a\u304f\u610f\u56f3\u304c\u660e\u78ba\u306a\u30b3\u30fc\u30c9\u304c\u66f8\u3051\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u6700\u5f8c\u306b\u91cd\u8981\u30dd\u30a4\u30f3\u30c8\u3092\u307e\u3068\u3081\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>==\u30fb!=\u6f14\u7b97\u5b50<\/strong>\uff1a\u6587\u5b57\u5217\u306e\u5024\u306e\u6bd4\u8f03\u306b\u4f7f\u3046\u57fa\u672c\u6f14\u7b97\u5b50\u3002Unicode\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u3067\u8f9e\u66f8\u9806\u6bd4\u8f03\u3082\u53ef\u80fd\u3002\u6570\u5024\u6587\u5b57\u5217\u306e\u5927\u5c0f\u6bd4\u8f03\u306f\u5909\u63db\u3057\u3066\u304b\u3089\u884c\u3046<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>is\u6f14\u7b97\u5b50<\/strong>\uff1aNone\u3068\u306e\u6bd4\u8f03\u5c02\u7528\u3002\u6587\u5b57\u5217\u306e\u5185\u5bb9\u6bd4\u8f03\u306b\u306f\u7d76\u5bfe\u306b\u4f7f\u308f\u306a\u3044\u3002\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u306e\u6709\u7121\u3067\u6319\u52d5\u304c\u5909\u308f\u308a\u3001\u30d0\u30b0\u306e\u6e29\u5e8a\u306b\u306a\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>in\u6f14\u7b97\u5b50\u30fbfind\/index\/startswith\/endswith<\/strong>\uff1a\u90e8\u5206\u4e00\u81f4\u306e\u691c\u7d22\u3002\u5b58\u5728\u78ba\u8a8d\u306a\u3089in\u3001\u4f4d\u7f6e\u304c\u5fc5\u8981\u306a\u3089find\u3001\u524d\u5f8c\u4e00\u81f4\u306a\u3089startswith\/endswith\u3092\u4f7f\u3046<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>re\u30e2\u30b8\u30e5\u30fc\u30eb<\/strong>\uff1a\u8907\u96d1\u306a\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\u306b\u4f7f\u3046\u3002match\uff08\u5148\u982d\uff09\u30fbsearch\uff08\u5168\u4f53\u306e1\u4ef6\uff09\u30fbfullmatch\uff08\u5b8c\u5168\u4e00\u81f4\uff09\u30fbfindall\uff08\u5168\u4ef6\uff09\u306e\u4f7f\u3044\u5206\u3051\u3092\u7406\u89e3\u3059\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>lower\/casefold<\/strong>\uff1a\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3057\u305f\u6bd4\u8f03\u306b\u306f\u4e21\u8fba\u306bcasefold()\u3092\u9069\u7528\u3002\u591a\u8a00\u8a9e\u5bfe\u5fdc\u3067\u306fcasefold()\u304c\u63a8\u5968<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>unicodedata.normalize()<\/strong>\uff1a\u5168\u89d2\u534a\u89d2\u304c\u6df7\u5728\u3059\u308b\u30c7\u30fc\u30bf\u306fNFKC\u6b63\u898f\u5316\u3067\u7d71\u4e00\u3057\u3066\u304b\u3089\u6bd4\u8f03\u3059\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>Claude Code\u6d3b\u7528<\/strong>\uff1a\u6b63\u898f\u8868\u73fe\u8a2d\u8a08\u30fb\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u5b9f\u88c5\u30fb\u30c6\u30b9\u30c8\u751f\u6210\u306f\u81ea\u7136\u8a00\u8a9e\u6307\u793a\u3067\u4efb\u305b\u308b\u3068\u958b\u767a\u901f\u5ea6\u304c80%\u4ee5\u4e0a\u5411\u4e0a\u3059\u308b<\/span><\/div>\n\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u6587\u5b57\u5217\u6bd4\u8f03\u306f\u300c\u77e5\u3063\u3066\u3044\u308b\u3064\u3082\u308a\u300d\u306b\u306a\u308a\u3084\u3059\u3044\u9818\u57df\u3067\u3059\u304c\u3001is\/==\u306e\u6df7\u540c\u30fb\u578b\u5909\u63db\u6f0f\u308c\u30fb\u5168\u89d2\u534a\u89d2\u306e\u53d6\u308a\u6271\u3044\u306a\u3069\u3001\u5b9f\u52d9\u3067\u306f\u898b\u843d\u3068\u3057\u3084\u3059\u3044\u843d\u3068\u3057\u7a74\u304c\u6570\u591a\u304f\u5b58\u5728\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u7d39\u4ecb\u3057\u305f\u30d1\u30bf\u30fc\u30f3\u3092\u4e00\u901a\u308a\u628a\u63e1\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u3067\u306e\u6307\u6458\u4e8b\u9805\u3092\u5927\u5e45\u306b\u6e1b\u3089\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u3057\u3066\u3001\u6587\u5b57\u5217\u51e6\u7406\u30b3\u30fc\u30c9\u306e\u5b9f\u88c5\u81ea\u4f53\u306fClaude Code\u306b\u4efb\u305b\u3066\u3057\u307e\u3046\u306e\u304c\u6700\u3082\u52b9\u7387\u7684\u3067\u3059\u3002<strong>\u300c\u4f55\u3092\u3057\u305f\u3044\u304b\u300d\u3092\u8a00\u8a9e\u5316\u3067\u304d\u308c\u3070\u3001Python\u306e\u69cb\u6587\u3092\u5b8c\u74a7\u306b\u899a\u3048\u3066\u3044\u306a\u304f\u3066\u3082\u9ad8\u54c1\u8cea\u306a\u30b3\u30fc\u30c9\u304c\u624b\u306b\u5165\u308b\u6642\u4ee3<\/strong>\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u7279\u306b\u6b63\u898f\u8868\u73fe\u3084unicode\u51e6\u7406\u306e\u3088\u3046\u306a\u300c\u8a73\u3057\u304f\u306a\u3044\u3068\u6642\u9593\u304c\u304b\u304b\u308b\u300d\u9818\u57df\u3053\u305d\u3001Claude Code\u306e\u52b9\u679c\u304c\u6700\u5927\u5316\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">Python\u306e\u6587\u5b57\u5217\u6bd4\u8f03\u306f\u3053\u306e\u8a18\u4e8b\u3067\u4e00\u901a\u308a\u7db2\u7f85\u3067\u304d\u3066\u3044\u307e\u3059\u3002\u30d6\u30c3\u30af\u30de\u30fc\u30af\u3057\u3066\u3001\u300c\u3042\u308c\u3069\u3046\u3060\u3063\u305f\u3063\u3051\u300d\u3068\u601d\u3063\u305f\u3068\u304d\u306b\u898b\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u7279\u306bis\u3068\u306e==\u306e\u9055\u3044\u3001casefold\u3068lower\u306e\u9055\u3044\u306f\u7e70\u308a\u8fd4\u3057\u78ba\u8a8d\u3057\u305f\u304f\u306a\u308b\u7b87\u6240\u3067\u3059\u3002<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Python\u6587\u5b57\u5217\u51e6\u7406\u30fb\u696d\u52d9\u81ea\u52d5\u5316\u30b3\u30fc\u30c9\u306e\u5b9f\u88c5\u3092\u3001AI\u9b3c\u7ba1\u7406\u304c\u4e00\u7dd2\u306b\u8a2d\u8a08\u3057\u307e\u3059<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u300c\u6b63\u898f\u8868\u73fe\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u66f8\u304f\u306e\u304c\u82e6\u624b\u300d\u300cPython\u30b3\u30fc\u30c9\u306e\u54c1\u8cea\u3092\u4e0a\u3052\u305f\u3044\u304c\u6642\u9593\u304c\u306a\u3044\u300d\u300cClaude Code\u3092\u4f7f\u3063\u305f\u696d\u52d9\u81ea\u52d5\u5316\u3092\u5c0e\u5165\u3057\u305f\u3044\u300d\u2014\u2014\u305d\u3093\u306a\u65b9\u306e\u305f\u3081\u306b\u3001\u5f0a\u793e\u3067\u306f<strong>Claude Code\u3092\u4f7f\u3063\u305f\u696d\u52d9\u52b9\u7387\u5316\u306e\u8a2d\u8a08\u652f\u63f4<\/strong>\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u30b3\u30fc\u30c9\u751f\u6210\u30fb\u30c7\u30d0\u30c3\u30b0\u30fb\u30c6\u30b9\u30c8\u81ea\u52d5\u5316\u307e\u3067\u3001\u3042\u306a\u305f\u306e\u696d\u52d9\u306b\u5408\u308f\u305b\u305f\u6700\u9069\u306a\u6d3b\u7528\u65b9\u6cd5\u3092\u4e00\u7dd2\u306b\u898b\u3064\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u300cPython\u306f\u5206\u304b\u308b\u3051\u3069Claude Code\u3092\u3069\u3046\u4f7f\u3048\u3070\u3044\u3044\u304b\u5206\u304b\u3089\u306a\u3044\u300d\u3068\u3044\u3046\u65b9\u3082\u3001\u300c\u305d\u3082\u305d\u3082\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u305f\u3053\u3068\u304c\u306a\u3044\u304c\u81ea\u52d5\u5316\u3057\u305f\u3044\u300d\u3068\u3044\u3046\u65b9\u3082\u3001\u307e\u305a\u306f\u7121\u6599\u76f8\u8ac7\u304b\u3089\u3069\u3046\u305e\u3002\u5f0a\u793e\u306e\u5b9f\u904b\u7528\u30ce\u30a6\u30cf\u30a6\u3092\u305d\u306e\u307e\u307e\u304a\u4f1d\u3048\u3057\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div style=\"background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);border-radius:16px;padding:36px 32px;margin:48px 0 16px;color:#fff;\">\n  <p style=\"font-size:13px;font-weight:700;color:#dc2626;letter-spacing:2px;margin:0 0 12px;\">NEXT STEP<\/p>\n  <p style=\"font-size:22px;font-weight:800;line-height:1.5;margin:0 0 20px;\">\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9\u3092\u3001\u3042\u306a\u305f\u306e\u30d3\u30b8\u30cd\u30b9\u3067<br>\u5b9f\u8df5\u3057\u3066\u307f\u307e\u305b\u3093\u304b\uff1f<\/p>\n  <div style=\"background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.12);border-radius:12px;padding:24px;max-width:560px;margin:0 auto;\">\n    <p style=\"font-size:13px;color:#dc2626;font-weight:700;margin:0 0 8px;\">AI\u6d3b\u7528\u3092\u81ea\u793e\u3067\u56de\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u305f\u3044\u65b9\u3078<\/p>\n    <p style=\"font-size:20px;font-weight:800;margin:0 0 12px;\">AI\u9b3c\u7ba1\u7406<\/p>\n    <p style=\"font-size:14px;color:rgba(255,255,255,0.75);margin:0 0 20px;line-height:1.7;\">Claude Code\u30fbCowork\u5c0e\u5165\u652f\u63f4\u304b\u3089\u696d\u52d9\u8a2d\u8a08\u30fb\u793e\u5185\u6d78\u900f\u307e\u3067\u5b9f\u8df5\u30d9\u30fc\u30b9\u3067\u4f34\u8d70\u3002\u300c\u81ea\u793e\u3067\u56de\u305b\u308b\u7d44\u7e54\u300d\u309290\u65e5\u3067\u4f5c\u308b\u7d4c\u55b6\u8005\u5411\u3051\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3002<\/p>\n    <div style=\"text-align:center;\">\n      <a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&utm_medium=article&utm_campaign=cc-python-string-compare&utm_content=next-step-cta\" target=\"_blank\" rel=\"noopener\" style=\"display:inline-block;background:#dc2626;color:#fff;font-weight:700;font-size:15px;padding:14px 32px;border-radius:30px;text-decoration:none;\">AI\u9b3c\u7ba1\u7406\u3092\u8a73\u3057\u304f\u898b\u308b \u2192<\/a>\n    <\/div>\n  <\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">\u3088\u304f\u3042\u308b\u8cea\u554f<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Q. Python\u3067is\u3068I==\u306e\u4f7f\u3044\u5206\u3051\u306f\u3069\u3046\u3059\u308c\u3070\u826f\u3044\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u57fa\u672c\u30eb\u30fc\u30eb\u306f\u300c\u6587\u5b57\u5217\u306e\u5185\u5bb9\u6bd4\u8f03\u306b\u306f\u5fc5\u305a==\u3092\u4f7f\u3044\u3001is\u306fNone\u30fbTrue\u30fbFalse\u3068\u306e\u6bd4\u8f03\u306b\u306e\u307f\u4f7f\u3046\u300d\u3067\u3059\u3002is\u306f\u30e1\u30e2\u30ea\u4e0a\u3067\u540c\u4e00\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53c2\u7167\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u305f\u3081\u3001\u6587\u5b57\u5217\u306e\u5185\u5bb9\u304c\u540c\u3058\u3067\u3082is\u304cFalse\u306b\u306a\u308b\u30b1\u30fc\u30b9\uff08\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u3055\u308c\u3066\u3044\u306a\u3044\u52d5\u7684\u751f\u6210\u6587\u5b57\u5217\uff09\u304c\u3042\u308a\u307e\u3059\u3002PEP8\uff08Python\u30b9\u30bf\u30a4\u30eb\u30ac\u30a4\u30c9\uff09\u3067\u3082None\u6bd4\u8f03\u306b\u306fis\u3092\u4f7f\u3046\u3088\u3046\u660e\u8a18\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u300c\u6587\u5b57\u5217\u3092is\u3067\u6bd4\u8f03\u3057\u305f\u3089\u305f\u307e\u306b\u52d5\u304b\u306a\u3044\u300d\u3068\u3044\u3046\u4e0d\u53ef\u89e3\u306a\u30d0\u30b0\u306e\u539f\u56e0\u306e\u591a\u304f\u306f\u3001\u3053\u306e\u6df7\u540c\u304b\u3089\u6765\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. \u6b63\u898f\u8868\u73fe\u306ere.match\u3068re.search\u306f\u3069\u3046\u9055\u3044\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. re.match\u306f\u6587\u5b57\u5217\u306e\u5148\u982d\u304b\u3089\u306e\u307f\u30de\u30c3\u30c1\u3092\u8a66\u307f\u307e\u3059\u3002\u4e00\u65b9re.search\u306f\u6587\u5b57\u5217\u5168\u4f53\u3092\u691c\u7d22\u3057\u3001\u6700\u521d\u306b\u30de\u30c3\u30c1\u3057\u305f\u4f4d\u7f6e\u3092\u8fd4\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u30c6\u30ad\u30b9\u30c8\u4e2d\u306e\u3069\u3053\u304b\u306b\u96fb\u8a71\u756a\u53f7\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3057\u305f\u3044\u5834\u5408\u306fre.search\u3001\u6587\u5b57\u5217\u304c\u5fc5\u305a\u5148\u982d\u304b\u3089\u7279\u5b9a\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u59cb\u307e\u308b\u304b\u3092\u78ba\u8a8d\u3057\u305f\u3044\u5834\u5408\u306fre.match\u3092\u4f7f\u3044\u307e\u3059\u3002\u307e\u305f\u6587\u5b57\u5217\u5168\u4f53\u304c\u30d1\u30bf\u30fc\u30f3\u3068\u4e00\u81f4\u3059\u308b\u304b\u3092\u78ba\u8a8d\u3057\u305f\u3044\u5834\u5408\u306fre.fullmatch\u304c\u6700\u9069\u3067\u3059\u3002\u5b9f\u52d9\u3067\u306fre.search\u306e\u4f7f\u7528\u983b\u5ea6\u304c\u6700\u3082\u9ad8\u304f\u3001\u6b21\u3044\u3067re.fullmatch\uff08\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\uff09\u30fbre.findall\uff08\u5168\u4ef6\u62bd\u51fa\uff09\u306e\u9806\u306b\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. \u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3057\u305f\u6587\u5b57\u5217\u6bd4\u8f03\u3092\u3057\u305f\u3044\u306e\u3067\u3059\u304c\u3001lower()\u3068casefold()\u3069\u3061\u3089\u3092\u4f7f\u3046\u3079\u304d\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u82f1\u8a9e\u306e\u307f\u3092\u6271\u3046\u5834\u5408\u306flower()\u3067\u3082\u5341\u5206\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001\u56fd\u969b\u5316\u5bfe\u5fdc\uff08\u65e5\u672c\u8a9e\u4ee5\u5916\u306e\u8a00\u8a9e\u3082\u6271\u3046\u53ef\u80fd\u6027\u304c\u3042\u308b\u5834\u5408\uff09\u3067\u306f<code>casefold()<\/code>\u3092\u4f7f\u3046\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002casefold()\u306fUnicode\u898f\u683c\u306b\u5f93\u3063\u305f\u3088\u308a\u7a4d\u6975\u7684\u306a\u30b1\u30fc\u30b9\u6b63\u898f\u5316\u3092\u884c\u3044\u3001\u4f8b\u3048\u3070\u30c9\u30a4\u30c4\u8a9e\u306e\u00df\uff08\u30a8\u30b9\u30c4\u30a7\u30c3\u30c8\uff09\u3092\u300css\u300d\u306b\u5909\u63db\u3059\u308b\u306a\u3069\u3001lower()\u3067\u306f\u5bfe\u5fdc\u3067\u304d\u306a\u3044\u6587\u5b57\u3082\u6b63\u898f\u5316\u3057\u307e\u3059\u3002\u3069\u3061\u3089\u3092\u4f7f\u3046\u5834\u5408\u3082\u3001\u6bd4\u8f03\u3059\u308b\u4e21\u65b9\u306e\u6587\u5b57\u5217\u306b\u540c\u3058\u30e1\u30bd\u30c3\u30c9\u3092\u9069\u7528\u3059\u308b\u3053\u3068\u3092\u5fd8\u308c\u305a\u306b\u5b9f\u65bd\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. \u65e5\u672c\u8a9e\u306e\u5168\u89d2\u30fb\u534a\u89d2\u3092\u7121\u8996\u3057\u3066\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. Python\u306eunicodedata\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3044\u3001\u6bd4\u8f03\u524d\u306bNFKC\u6b63\u898f\u5316\u3092\u884c\u3044\u307e\u3059\u3002<code>import unicodedata<\/code>\u306e\u5f8c\u3001<code>unicodedata.normalize(\"NFKC\", s)<\/code>\u3092\u4e21\u65b9\u306e\u6587\u5b57\u5217\u306b\u9069\u7528\u3057\u3066\u304b\u3089==\u3067\u6bd4\u8f03\u3057\u307e\u3059\u3002NFKC\u6b63\u898f\u5316\u3067\u306f\u5168\u89d2\u82f1\u6570\u5b57\u30fb\u8a18\u53f7\u304c\u534a\u89d2\u306b\u7d71\u4e00\u3055\u308c\u307e\u3059\u3002\u305f\u3060\u3057\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u306f\u5225\u306e\u6587\u5b57\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u305f\u3081\u3001\u4eee\u540d\u306e\u7d71\u4e00\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u5c02\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\uff08\u4f8b\uff1ajaconv\u30d1\u30c3\u30b1\u30fc\u30b8\uff09\u306e\u4f7f\u7528\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. Python\u3067\u300c\u6587\u5b57\u5217\u306e\u985e\u4f3c\u5ea6\u300d\u3092\u8a08\u7b97\u3057\u3066\u90e8\u5206\u4e00\u81f4\u691c\u7d22\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u3057\u3067\u5b9f\u88c5\u3059\u308b\u306a\u3089difflib.SequenceMatcher\uff08Python\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\uff09\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002<code>from difflib import SequenceMatcher<\/code>\u3067\u53d6\u308a\u8fbc\u307f\u3001<code>SequenceMatcher(None, s1, s2).ratio()<\/code>\u30670\u301c1\u306e\u985e\u4f3c\u5ea6\u30b9\u30b3\u30a2\u304c\u5f97\u3089\u308c\u307e\u3059\u3002\u3088\u308a\u9ad8\u5ea6\u306a\u30d5\u30a1\u30b8\u30fc\u30de\u30c3\u30c1\u30f3\u30b0\u304c\u5fc5\u8981\u306a\u5834\u5408\u306ffuzz\uff08python-Levenshtein\u30d1\u30c3\u30b1\u30fc\u30b8\uff09\u3084rapid-fuzz\u304c\u5b9f\u52d9\u3067\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002\u65e5\u672c\u8a9e\u306e\u4eba\u540d\u30fb\u4f4f\u6240\u306e\u7a81\u304d\u5408\u308f\u305b\u306b\u306f\u3001\u3053\u308c\u3089\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u6b63\u898f\u5316\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u3046\u306e\u304c\u4e00\u822c\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. Claude Code\u3067\u6b63\u898f\u8868\u73fe\u3092\u751f\u6210\u3055\u305b\u308b\u306b\u306f\u3069\u306e\u3088\u3046\u306b\u6307\u793a\u3059\u308c\u3070\u826f\u3044\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u300c\u3007\u3007\u306e\u5f62\u5f0f\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u6b63\u898f\u8868\u73fe\u30d1\u30bf\u30fc\u30f3\u3092Python\u30b3\u30fc\u30c9\u3067\u66f8\u3044\u3066\u3002re.fullmatch\u3092\u4f7f\u3044\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u95a2\u6570\u306e\u5f62\u3067\u5b9f\u88c5\u3057\u3066\u3002docstring\u3068\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3082\u542b\u3081\u3066\u300d\u306e\u3088\u3046\u306b\u3001\u76ee\u7684\u30fb\u4f7f\u7528\u3059\u308bre\u95a2\u6570\u30fb\u30b3\u30fc\u30c9\u306e\u5f62\u5f0f\u30fb\u4ed8\u968f\u7269\uff08\u30c6\u30b9\u30c8\u7b49\uff09\u3092\u660e\u793a\u3059\u308b\u3068\u7cbe\u5ea6\u306e\u9ad8\u3044\u51fa\u529b\u304c\u5f97\u3089\u308c\u307e\u3059\u3002\u6b63\u898f\u8868\u73fe\u30d1\u30bf\u30fc\u30f3\u306e\u8aac\u660e\u3082\u30b3\u30e1\u30f3\u30c8\u3068\u3057\u3066\u542b\u3081\u308b\u3088\u3046\u6307\u793a\u3059\u308b\u3068\u3001\u751f\u6210\u3055\u308c\u305f\u30b3\u30fc\u30c9\u306e\u610f\u5473\u3092\u78ba\u8a8d\u30fb\u5b66\u7fd2\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002Claude Code\u306f\u6b63\u898f\u8868\u73fe\u306e\u8a2d\u8a08\u304c\u975e\u5e38\u306b\u5f97\u610f\u3067\u3001\u96fb\u8a71\u756a\u53f7\u30fb\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u30fbURL\u306a\u3069\u306e\u5178\u578b\u30d1\u30bf\u30fc\u30f3\u306f\u6570\u79d2\u3067\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. Python\u3067\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3059\u308b\u3068\u304d\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6ce8\u610f\u70b9\u306f\u3042\u308a\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u4e00\u822c\u7684\u306b\u306f==\u306b\u3088\u308b\u5b8c\u5168\u4e00\u81f4\u6bd4\u8f03\u304c\u6700\u901f\u3067\u3001in\u6f14\u7b97\u5b50\u306b\u3088\u308b\u90e8\u5206\u4e00\u81f4\u304c\u305d\u306e\u6b21\u3001\u6b63\u898f\u8868\u73fere.search\u304c\u6700\u3082\u51e6\u7406\u304c\u91cd\u304f\u306a\u308b\u50be\u5411\u304c\u3042\u308a\u307e\u3059\u3002\u6b63\u898f\u8868\u73fe\u3092\u30eb\u30fc\u30d7\u5185\u3067\u7e70\u308a\u8fd4\u3057\u4f7f\u3046\u5834\u5408\u306f<code>re.compile()<\/code>\u3067\u30d1\u30bf\u30fc\u30f3\u3092\u4e8b\u524d\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304b\u3089\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u3001\u5927\u91cf\u306e\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3059\u308b\u969b\u306b\u6bce\u56delower()\u3084casefold()\u3092\u547c\u3076\u3068\u3001\u5909\u63db\u51e6\u7406\u306e\u30b3\u30b9\u30c8\u304c\u7d2f\u7a4d\u3057\u307e\u3059\u3002\u6bd4\u8f03\u5bfe\u8c61\u304c\u56fa\u5b9a\u306e\u5834\u5408\u306f\u4e8b\u524d\u306b\u6b63\u898f\u5316\u6e08\u307f\u306e\u6587\u5b57\u5217\u3092\u7528\u610f\u3057\u3066\u304a\u304f\u65b9\u304c\u52b9\u7387\u7684\u3067\u3059\u3002\u5b9f\u969b\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u306f<code>timeit<\/code>\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u8a08\u6e2c\u3057\u3066\u5224\u65ad\u3059\u308b\u306e\u304c\u78ba\u5b9f\u3067\u3059\u3002<\/p>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Python\u3067is\u3068I==\u306e\u4f7f\u3044\u5206\u3051\u306f\u3069\u3046\u3059\u308c\u3070\u826f\u3044\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u57fa\u672c\u30eb\u30fc\u30eb\u306f\u300c\u6587\u5b57\u5217\u306e\u5185\u5bb9\u6bd4\u8f03\u306b\u306f\u5fc5\u305a==\u3092\u4f7f\u3044\u3001is\u306fNone\u30fbTrue\u30fbFalse\u3068\u306e\u6bd4\u8f03\u306b\u306e\u307f\u4f7f\u3046\u300d\u3067\u3059\u3002is\u306f\u30e1\u30e2\u30ea\u4e0a\u3067\u540c\u4e00\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53c2\u7167\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u305f\u3081\u3001\u6587\u5b57\u5217\u306e\u5185\u5bb9\u304c\u540c\u3058\u3067\u3082is\u304cFalse\u306b\u306a\u308b\u30b1\u30fc\u30b9\uff08\u30a4\u30f3\u30bf\u30fc\u30cb\u30f3\u30b0\u3055\u308c\u3066\u3044\u306a\u3044\u52d5\u7684\u751f\u6210\u6587\u5b57\u5217\uff09\u304c\u3042\u308a\u307e\u3059\u3002PEP8\uff08Python\u30b9\u30bf\u30a4\u30eb\u30ac\u30a4\u30c9\uff09\u3067\u3082None\u6bd4\u8f03\u306b\u306fis\u3092\u4f7f\u3046\u3088\u3046\u660e\u8a18\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u300c\u6587\u5b57\u5217\u3092is\u3067\u6bd4\u8f03\u3057\u305f\u3089\u305f\u307e\u306b\u52d5\u304b\u306a\u3044\u300d\u3068\u3044\u3046\u4e0d\u53ef\u89e3\u306a\u30d0\u30b0\u306e\u539f\u56e0\u306e\u591a\u304f\u306f\u3001\u3053\u306e\u6df7\u540c\u304b\u3089\u6765\u3066\u3044\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"\u6b63\u898f\u8868\u73fe\u306ere.match\u3068re.search\u306f\u3069\u3046\u9055\u3044\u307e\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"re.match\u306f\u6587\u5b57\u5217\u306e\u5148\u982d\u304b\u3089\u306e\u307f\u30de\u30c3\u30c1\u3092\u8a66\u307f\u307e\u3059\u3002\u4e00\u65b9re.search\u306f\u6587\u5b57\u5217\u5168\u4f53\u3092\u691c\u7d22\u3057\u3001\u6700\u521d\u306b\u30de\u30c3\u30c1\u3057\u305f\u4f4d\u7f6e\u3092\u8fd4\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u30c6\u30ad\u30b9\u30c8\u4e2d\u306e\u3069\u3053\u304b\u306b\u96fb\u8a71\u756a\u53f7\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3057\u305f\u3044\u5834\u5408\u306fre.search\u3001\u6587\u5b57\u5217\u304c\u5fc5\u305a\u5148\u982d\u304b\u3089\u7279\u5b9a\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u59cb\u307e\u308b\u304b\u3092\u78ba\u8a8d\u3057\u305f\u3044\u5834\u5408\u306fre.match\u3092\u4f7f\u3044\u307e\u3059\u3002\u307e\u305f\u6587\u5b57\u5217\u5168\u4f53\u304c\u30d1\u30bf\u30fc\u30f3\u3068\u4e00\u81f4\u3059\u308b\u304b\u3092\u78ba\u8a8d\u3057\u305f\u3044\u5834\u5408\u306fre.fullmatch\u304c\u6700\u9069\u3067\u3059\u3002\u5b9f\u52d9\u3067\u306fre.search\u306e\u4f7f\u7528\u983b\u5ea6\u304c\u6700\u3082\u9ad8\u304f\u3001\u6b21\u3044\u3067re.fullmatch\uff08\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\uff09\u30fbre.findall\uff08\u5168\u4ef6\u62bd\u51fa\uff09\u306e\u9806\u306b\u4f7f\u308f\u308c\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3057\u305f\u6587\u5b57\u5217\u6bd4\u8f03\u3092\u3057\u305f\u3044\u306e\u3067\u3059\u304c\u3001lower()\u3068casefold()\u3069\u3061\u3089\u3092\u4f7f\u3046\u3079\u304d\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u82f1\u8a9e\u306e\u307f\u3092\u6271\u3046\u5834\u5408\u306flower()\u3067\u3082\u5341\u5206\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001\u56fd\u969b\u5316\u5bfe\u5fdc\uff08\u65e5\u672c\u8a9e\u4ee5\u5916\u306e\u8a00\u8a9e\u3082\u6271\u3046\u53ef\u80fd\u6027\u304c\u3042\u308b\u5834\u5408\uff09\u3067\u306f<code>casefold()<\/code>\u3092\u4f7f\u3046\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002casefold()\u306fUnicode\u898f\u683c\u306b\u5f93\u3063\u305f\u3088\u308a\u7a4d\u6975\u7684\u306a\u30b1\u30fc\u30b9\u6b63\u898f\u5316\u3092\u884c\u3044\u3001\u4f8b\u3048\u3070\u30c9\u30a4\u30c4\u8a9e\u306e\u00df\uff08\u30a8\u30b9\u30c4\u30a7\u30c3\u30c8\uff09\u3092\u300css\u300d\u306b\u5909\u63db\u3059\u308b\u306a\u3069\u3001lower()\u3067\u306f\u5bfe\u5fdc\u3067\u304d\u306a\u3044\u6587\u5b57\u3082\u6b63\u898f\u5316\u3057\u307e\u3059\u3002\u3069\u3061\u3089\u3092\u4f7f\u3046\u5834\u5408\u3082\u3001\u6bd4\u8f03\u3059\u308b\u4e21\u65b9\u306e\u6587\u5b57\u5217\u306b\u540c\u3058\u30e1\u30bd\u30c3\u30c9\u3092\u9069\u7528\u3059\u308b\u3053\u3068\u3092\u5fd8\u308c\u305a\u306b\u5b9f\u65bd\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"\u65e5\u672c\u8a9e\u306e\u5168\u89d2\u30fb\u534a\u89d2\u3092\u7121\u8996\u3057\u3066\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Python\u306eunicodedata\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3044\u3001\u6bd4\u8f03\u524d\u306bNFKC\u6b63\u898f\u5316\u3092\u884c\u3044\u307e\u3059\u3002<code>import unicodedata<\/code>\u306e\u5f8c\u3001<code>unicodedata.normalize(\\\"NFKC\\\", s)<\/code>\u3092\u4e21\u65b9\u306e\u6587\u5b57\u5217\u306b\u9069\u7528\u3057\u3066\u304b\u3089==\u3067\u6bd4\u8f03\u3057\u307e\u3059\u3002NFKC\u6b63\u898f\u5316\u3067\u306f\u5168\u89d2\u82f1\u6570\u5b57\u30fb\u8a18\u53f7\u304c\u534a\u89d2\u306b\u7d71\u4e00\u3055\u308c\u307e\u3059\u3002\u305f\u3060\u3057\u3072\u3089\u304c\u306a\u3068\u30ab\u30bf\u30ab\u30ca\u306f\u5225\u306e\u6587\u5b57\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u305f\u3081\u3001\u4eee\u540d\u306e\u7d71\u4e00\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u5c02\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\uff08\u4f8b\uff1ajaconv\u30d1\u30c3\u30b1\u30fc\u30b8\uff09\u306e\u4f7f\u7528\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Python\u3067\u300c\u6587\u5b57\u5217\u306e\u985e\u4f3c\u5ea6\u300d\u3092\u8a08\u7b97\u3057\u3066\u90e8\u5206\u4e00\u81f4\u691c\u7d22\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u3057\u3067\u5b9f\u88c5\u3059\u308b\u306a\u3089difflib.SequenceMatcher\uff08Python\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\uff09\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002<code>from difflib import SequenceMatcher<\/code>\u3067\u53d6\u308a\u8fbc\u307f\u3001<code>SequenceMatcher(None, s1, s2).ratio()<\/code>\u30670\u301c1\u306e\u985e\u4f3c\u5ea6\u30b9\u30b3\u30a2\u304c\u5f97\u3089\u308c\u307e\u3059\u3002\u3088\u308a\u9ad8\u5ea6\u306a\u30d5\u30a1\u30b8\u30fc\u30de\u30c3\u30c1\u30f3\u30b0\u304c\u5fc5\u8981\u306a\u5834\u5408\u306ffuzz\uff08python-Levenshtein\u30d1\u30c3\u30b1\u30fc\u30b8\uff09\u3084rapid-fuzz\u304c\u5b9f\u52d9\u3067\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002\u65e5\u672c\u8a9e\u306e\u4eba\u540d\u30fb\u4f4f\u6240\u306e\u7a81\u304d\u5408\u308f\u305b\u306b\u306f\u3001\u3053\u308c\u3089\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u6b63\u898f\u5316\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u3046\u306e\u304c\u4e00\u822c\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Claude Code\u3067\u6b63\u898f\u8868\u73fe\u3092\u751f\u6210\u3055\u305b\u308b\u306b\u306f\u3069\u306e\u3088\u3046\u306b\u6307\u793a\u3059\u308c\u3070\u826f\u3044\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u300c\u3007\u3007\u306e\u5f62\u5f0f\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u6b63\u898f\u8868\u73fe\u30d1\u30bf\u30fc\u30f3\u3092Python\u30b3\u30fc\u30c9\u3067\u66f8\u3044\u3066\u3002re.fullmatch\u3092\u4f7f\u3044\u3001\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u95a2\u6570\u306e\u5f62\u3067\u5b9f\u88c5\u3057\u3066\u3002docstring\u3068\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3082\u542b\u3081\u3066\u300d\u306e\u3088\u3046\u306b\u3001\u76ee\u7684\u30fb\u4f7f\u7528\u3059\u308bre\u95a2\u6570\u30fb\u30b3\u30fc\u30c9\u306e\u5f62\u5f0f\u30fb\u4ed8\u968f\u7269\uff08\u30c6\u30b9\u30c8\u7b49\uff09\u3092\u660e\u793a\u3059\u308b\u3068\u7cbe\u5ea6\u306e\u9ad8\u3044\u51fa\u529b\u304c\u5f97\u3089\u308c\u307e\u3059\u3002\u6b63\u898f\u8868\u73fe\u30d1\u30bf\u30fc\u30f3\u306e\u8aac\u660e\u3082\u30b3\u30e1\u30f3\u30c8\u3068\u3057\u3066\u542b\u3081\u308b\u3088\u3046\u6307\u793a\u3059\u308b\u3068\u3001\u751f\u6210\u3055\u308c\u305f\u30b3\u30fc\u30c9\u306e\u610f\u5473\u3092\u78ba\u8a8d\u30fb\u5b66\u7fd2\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002Claude Code\u306f\u6b63\u898f\u8868\u73fe\u306e\u8a2d\u8a08\u304c\u975e\u5e38\u306b\u5f97\u610f\u3067\u3001\u96fb\u8a71\u756a\u53f7\u30fb\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u30fbURL\u306a\u3069\u306e\u5178\u578b\u30d1\u30bf\u30fc\u30f3\u306f\u6570\u79d2\u3067\u51fa\u529b\u3055\u308c\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Python\u3067\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3059\u308b\u3068\u304d\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6ce8\u610f\u70b9\u306f\u3042\u308a\u307e\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u4e00\u822c\u7684\u306b\u306f==\u306b\u3088\u308b\u5b8c\u5168\u4e00\u81f4\u6bd4\u8f03\u304c\u6700\u901f\u3067\u3001in\u6f14\u7b97\u5b50\u306b\u3088\u308b\u90e8\u5206\u4e00\u81f4\u304c\u305d\u306e\u6b21\u3001\u6b63\u898f\u8868\u73fere.search\u304c\u6700\u3082\u51e6\u7406\u304c\u91cd\u304f\u306a\u308b\u50be\u5411\u304c\u3042\u308a\u307e\u3059\u3002\u6b63\u898f\u8868\u73fe\u3092\u30eb\u30fc\u30d7\u5185\u3067\u7e70\u308a\u8fd4\u3057\u4f7f\u3046\u5834\u5408\u306f<code>re.compile()<\/code>\u3067\u30d1\u30bf\u30fc\u30f3\u3092\u4e8b\u524d\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304b\u3089\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u3001\u5927\u91cf\u306e\u6587\u5b57\u5217\u3092\u6bd4\u8f03\u3059\u308b\u969b\u306b\u6bce\u56delower()\u3084casefold()\u3092\u547c\u3076\u3068\u3001\u5909\u63db\u51e6\u7406\u306e\u30b3\u30b9\u30c8\u304c\u7d2f\u7a4d\u3057\u307e\u3059\u3002\u6bd4\u8f03\u5bfe\u8c61\u304c\u56fa\u5b9a\u306e\u5834\u5408\u306f\u4e8b\u524d\u306b\u6b63\u898f\u5316\u6e08\u307f\u306e\u6587\u5b57\u5217\u3092\u7528\u610f\u3057\u3066\u304a\u304f\u65b9\u304c\u52b9\u7387\u7684\u3067\u3059\u3002\u5b9f\u969b\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u306f<code>timeit<\/code>\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u8a08\u6e2c\u3057\u3066\u5224\u65ad\u3059\u308b\u306e\u304c\u78ba\u5b9f\u3067\u3059\u3002\"\n      }\n    }\n  ]\n}\n<\/script>\n\n\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9 01Python\u6587\u5b57\u5217\u6bd4\u8f03\u306e\u57fa\u790e\uff08==\u30fb!=\u6f14\u7b97\u5b50\uff09 02is\u6f14\u7b97\u5b50\u3068\u306f\u4f55\u304b\u30fb==\u3068\u306e\u6c7a\u5b9a\u7684\u306a\u9055\u3044 03in\u6f14\u7b97\u5b50\u306b\u3088\u308b\u90e8\u5206\u4e00\u81f4\u691c\u7d22 04\u6b63\u898f\u8868\u73fe\uff08re\u30e2\u30b8\u30e5\u30fc\u30eb\uff09\u306b\u3088\u308b\u9ad8\u5ea6\u306a\u6bd4\u8f03 05\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":15674,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sitemap_hide":"","_veu_custom_css":"","vkexunit_cta_each_option":"","footnotes":"","rank_math_description":"Python\u6587\u5b57\u5217\u306e\u6bd4\u8f03\u65b9\u6cd5\u3092\u5b8c\u5168\u89e3\u8aac\u3002==\u3068!=\u306e\u57fa\u672c\u6bd4\u8f03\u3001is\u6f14\u7b97\u5b50\u3068\u306e\u9055\u3044\u3001in\u6f14\u7b97\u5b50\u306e\u90e8\u5206\u4e00\u81f4\u3001\u6b63\u898f\u8868\u73fe\uff08re.match\/search\uff09\u3001\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u7121\u8996\u306e\u65b9\u6cd5\u3001\u65e5\u672c\u8a9e\u5bfe\u5fdc\u307e\u3067\u3002Claude Code\u3067\u6587\u5b57\u5217\u51e6\u7406\u30b3\u30fc\u30c9\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b\u65b9\u6cd5\u3082\u89e3\u8aac\u3002","rank_math_focus_keyword":"Python \u6587\u5b57\u5217 \u6bd4\u8f03","rank_math_title":"\u30102026\u5e747\u6708\u6700\u65b0\u3011Python\u6587\u5b57\u5217\u306e\u6bd4\u8f03\u65b9\u6cd5\u307e\u3068\u3081\uff5c==\u30fbis\u30fbin\u30fb\u6b63\u898f\u8868\u73fe\u306e\u5b8c\u5168\u30ac\u30a4\u30c9\u3068Claude Code\u3067\u52b9\u7387\u5316\u3059\u308b\u65b9\u6cd5","pending_rewrite_html":"","pending_rewrite_id":"","pending_rewrite_kw":"","pending_rewrite_at":"","pending_rewrite_source":"","pending_rewrite_brief":"","pending_rewrite_evidence":"","approved_rewrite_html":"","approved_rewrite_id":"","approved_rewrite_kw":"","approved_rewrite_at":"","approved_rewrite_by":"","approved_rewrite_brief":"","approved_rewrite_evidence":"","rewrite_tracker_baseline":"","rewrite_tracker_7day":"","rewrite_tracker_14day":"","rewrite_tracker_30day":"","rewrite_tracker_notified":""},"categories":[2],"tags":[],"class_list":["post-15675","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-claude-tips"],"_links":{"self":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/15675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/comments?post=15675"}],"version-history":[{"count":1,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/15675\/revisions"}],"predecessor-version":[{"id":15676,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/15675\/revisions\/15676"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media\/15674"}],"wp:attachment":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media?parent=15675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/categories?post=15675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/tags?post=15675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}