{"id":115450,"date":"2024-03-23T02:50:11","date_gmt":"2024-03-22T17:50:11","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/"},"modified":"2024-03-26T22:53:36","modified_gmt":"2024-03-26T13:53:36","slug":"python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/","title":{"rendered":"Python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9"},"content":{"rendered":"<p>Python \u306b\u306f\u6587\u5b57\u5217\u51e6\u7406\u306e\u305f\u3081\u306e\u591a\u304f\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u3001\u4ee5\u4e0b\u306b\u305d\u306e\u3044\u304f\u3064\u304b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u30b9\u30e9\u30a4\u30b9: \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3084\u30b9\u30e9\u30a4\u30b9\u64cd\u4f5c\u3092\u4f7f\u3063\u3066\u3001\u6587\u5b57\u5217\u306e\u90e8\u5206\u6587\u5b57\u5217\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001str[start:end] \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9 start \u304b\u3089 end-1 \u307e\u3067\u306e\u90e8\u5206\u6587\u5b57\u5217\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/li>\n<li>\u9023\u7d50\uff1a\u9023\u7d50\u306b+\u6f14\u7b97\u5b50\u3092\u7528\u3044\u308b\u3053\u3068\u3067\u3001\u4e8c\u3064\u306e\u6587\u5b57\u5217\u306f\u9023\u7d50\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/li>\n<li>\u6587\u5b57\u5927\u5c0f\u306e\u5909\u63db\uff1a`str.upper()`\u3067\u306f\u6587\u5b57\u5217\u306e\u5168\u3066\u306e\u6587\u5b57\u3092\u5927\u6587\u5b57\u306b\u5909\u63db\u3067\u304d\u3001`str.lower()`\u3067\u306f\u6587\u5b57\u5217\u306e\u5168\u3066\u306e\u6587\u5b57\u3092\u5c0f\u6587\u5b57\u306b\u5909\u63db\u3067\u304d\u308b\u3002<\/li>\n<li>\u7a7a\u767d\u6587\u5b57\u3092\u524a\u9664\u3059\u308b: str.strip() \u3092\u4f7f\u7528\u3057\u3066\u3001\u6587\u5b57\u5217\u306e\u5148\u982d\u3068\u672b\u5c3e\u306e\u7a7a\u767d\u6587\u5b57\u3092\u524a\u9664\u3067\u304d\u307e\u3059\u3002<\/li>\n<li>\u6587\u5b57\u5217\u306e\u4e2d\u306e\u3059\u3079\u3066\u306eold\u30b5\u30d6\u6587\u5b57\u5217\u3092new\u306b\u7f6e\u304d\u63db\u3048\u308b\u306b\u306f\u3001str.replace(old, new)\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/li>\n<li>\u6587\u5b57\u5217\u5185\u304b\u3089\u30b5\u30d6\u6587\u5b57\u5217sub\u304c\u6700\u521d\u306b\u73fe\u308c\u308b\u4f4d\u7f6e\u3092str.find(sub)\u3067\u691c\u7d22\u3067\u304d\u307e\u3059\u3002\u898b\u3064\u304b\u3089\u306a\u3044\u5834\u5408\u306f-1\u3092\u8fd4\u3057\u307e\u3059\u3002<\/li>\n<li>\u6587\u5b57\u5217\u3092\u533a\u5207\u308a\u6587\u5b57sep\u3067\u5206\u5272\u3059\u308b\u306b\u306f\u3001str.split(sep)\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u6587\u5b57\u5217\u3092\u8907\u6570\u306e\u90e8\u5206\u6587\u5b57\u5217\u306b\u5206\u5272\u3057\u3001\u30ea\u30b9\u30c8\u3068\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002<\/li>\n<li>\u6587\u5b57\u5217\u306e\u66f8\u5f0f\u8a2d\u5b9a\u30e1\u30bd\u30c3\u30c9format()\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u6307\u5b9a\u3055\u308c\u305f\u5024\u306b\u66f8\u5f0f\u6307\u5b9a\u3057\u305f\u6587\u5b57\u5217\u4e2d\u306e\u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u30fc\u3092\u7f6e\u63db\u3067\u304d\u307e\u3059\u3002<\/li>\n<li>\u6587\u5b57\u5217\u306e\u9577\u3055\uff1a`str`\u306e\u6587\u5b57\u6570\u306f`len(str)`\u3067\u53d6\u5f97\u3067\u304d\u308b\u3002<\/li>\n<li>\u982d\u304b\u7d42\u308f\u308a\u3092\u5224\u5b9a\u3059\u308b\uff1a\u6587\u5b57\u5217\u304c\u6587\u5b57\u5217sub\u3067\u59cb\u307e\u3063\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u306fstr.startswith(sub)\u3001\u6587\u5b57\u5217\u304c\u6587\u5b57\u5217sub\u3067\u7d42\u308f\u3063\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u306fstr.endswith(sub)\u3067\u5224\u5b9a\u3067\u304d\u308b\u3002<\/li>\n<\/ol>\n<p>\u4e0a\u8a18\u306b\u6319\u3052\u305f\u306e\u306f\u3001\u3088\u304f\u4f7f\u308f\u308c\u308b\u6587\u5b57\u5217\u64cd\u4f5c\u95a2\u6570\u306e\u307b\u3093\u306e\u4e00\u90e8\u3067\u3001Python\u306b\u306f\u4ed6\u306b\u3082\u305f\u304f\u3055\u3093\u306e\u6587\u5b57\u5217\u64cd\u4f5c\u95a2\u6570\u3084\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u76ee\u7684\u306b\u5408\u308f\u305b\u3066\u9078\u629e\u3057\u3066\u4f7f\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python \u306b\u306f\u6587\u5b57\u5217\u51e6\u7406\u306e\u305f\u3081\u306e\u591a\u304f\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u3001\u4ee5\u4e0b\u306b\u305d\u306e\u3044\u304f\u3064\u304b\u3092\u793a\u3057\u307e\u3059\u3002 \u30b9\u30e9\u30a4\u30b9: \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3084\u30b9\u30e9\u30a4\u30b9\u64cd\u4f5c\u3092\u4f7f\u3063\u3066\u3001\u6587\u5b57\u5217\u306e\u90e8\u5206\u6587\u5b57\u5217\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001str[start:end] \u3092\u4f7f\u7528\u3059 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-115450","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9\" \/>\n<meta property=\"og:description\" content=\"Python \u306b\u306f\u6587\u5b57\u5217\u51e6\u7406\u306e\u305f\u3081\u306e\u591a\u304f\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u3001\u4ee5\u4e0b\u306b\u305d\u306e\u3044\u304f\u3064\u304b\u3092\u793a\u3057\u307e\u3059\u3002 \u30b9\u30e9\u30a4\u30b9: \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3084\u30b9\u30e9\u30a4\u30b9\u64cd\u4f5c\u3092\u4f7f\u3063\u3066\u3001\u6587\u5b57\u5217\u306e\u90e8\u5206\u6587\u5b57\u5217\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001str[start:end] \u3092\u4f7f\u7528\u3059 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-22T17:50:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-26T13:53:36+00:00\" \/>\n<meta name=\"author\" content=\"\u6d77\u6597, \u8475\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6d77\u6597, \u8475\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/\",\"name\":\"Python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2024-03-22T17:50:11+00:00\",\"dateModified\":\"2024-03-26T13:53:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6\",\"name\":\"\u6d77\u6597, \u8475\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g\",\"caption\":\"\u6d77\u6597, \u8475\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/kaitoaoi\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9\/","og_locale":"ja_JP","og_type":"article","og_title":"Python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9","og_description":"Python \u306b\u306f\u6587\u5b57\u5217\u51e6\u7406\u306e\u305f\u3081\u306e\u591a\u304f\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u3001\u4ee5\u4e0b\u306b\u305d\u306e\u3044\u304f\u3064\u304b\u3092\u793a\u3057\u307e\u3059\u3002 \u30b9\u30e9\u30a4\u30b9: \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3084\u30b9\u30e9\u30a4\u30b9\u64cd\u4f5c\u3092\u4f7f\u3063\u3066\u3001\u6587\u5b57\u5217\u306e\u90e8\u5206\u6587\u5b57\u5217\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001str[start:end] \u3092\u4f7f\u7528\u3059 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-03-22T17:50:11+00:00","article_modified_time":"2024-03-26T13:53:36+00:00","author":"\u6d77\u6597, \u8475","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u6d77\u6597, \u8475"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/","name":"Python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2024-03-22T17:50:11+00:00","dateModified":"2024-03-26T13:53:36+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Python\u6587\u5b57\u5217\u51e6\u7406\u306e\u30e1\u30bd\u30c3\u30c9"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6","name":"\u6d77\u6597, \u8475","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g","caption":"\u6d77\u6597, \u8475"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/kaitoaoi\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e6%96%87%e5%ad%97%e5%88%97%e5%87%a6%e7%90%86%e3%81%ae%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/115450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=115450"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/115450\/revisions"}],"predecessor-version":[{"id":158213,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/115450\/revisions\/158213"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=115450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=115450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=115450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}