{"id":118385,"date":"2024-03-23T14:12:20","date_gmt":"2024-03-23T05:12:20","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/"},"modified":"2024-03-28T04:17:37","modified_gmt":"2024-03-27T19:17:37","slug":"python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/","title":{"rendered":"Python \u306e range \u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f"},"content":{"rendered":"<p>Python\u3067\u306frange\u95a2\u6570\u306f\u3001\u6307\u5b9a\u3055\u308c\u305f\u7bc4\u56f2\u306e\u6574\u6570\u306e\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>range\u95a2\u6570\u306e\u3088\u304f\u3042\u308b\u4f7f\u3044\u65b9\u306f3\u3064\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>stop\u307e\u3067\u306e\u7bc4\u56f2<\/li>\n<\/ol>\n<p>0\u304b\u3089\u59cb\u307e\u308a stop-1\u3067\u7d42\u308f\u308b\u6574\u6570\u5217\u3092\u751f\u6210\u3059\u308b\u3001\u3068\u3044\u3063\u305f\u4f7f\u3044\u65b9\u3092\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070 range(5) \u3068\u3059\u308b\u3068\u30010\u30011\u30012\u30013\u30014\u3068\u3044\u3046\u6574\u6570\u5217\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u7bc4\u56f2(start, stop)<\/li>\n<\/ol>\n<p>\u3053\u306e\u5229\u7528\u65b9\u6cd5\u306f\u3001start\u304b\u3089\u59cb\u307e\u3063\u3066stop-1\u3067\u7d42\u308f\u308b\u6574\u6570\u5217\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3092\u793a\u3057\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001range(2,7)\u306f\u30012,3,4,5,6\u3092\u542b\u3080\u6574\u6570\u5217\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<ol>\n<li>range(\u958b\u59cb, \u7d42\u4e86, \u30b9\u30c6\u30c3\u30d7)<\/li>\n<\/ol>\n<p>\u3053\u306e\u4f7f\u3044\u65b9\u306f\u3001start\u304b\u3089\u59cb\u307e\u3063\u3066stop-1\u3067\u7d42\u308f\u308b\u3001step\u306e\u5dee\u3092\u6301\u3064\u6574\u6570\u306e\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u751f\u6210\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001range(1, 10, 2)\u3067\u306f1\u30013\u30015\u30017\u30019\u3092\u542b\u3080\u6574\u6570\u306e\u30b7\u30fc\u30b1\u30f3\u30b9\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u306erange\u95a2\u6570\u306f\u30a4\u30c6\u30e9\u30d6\u30eb\u3092\u8fd4\u3059\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u3001\u30ea\u30b9\u30c8\u95a2\u6570\u3092\u4f7f\u3063\u3066\u30ea\u30b9\u30c8\u306b\u5909\u63db\u3059\u308b\u304b\u3001\u30eb\u30fc\u30d7\u3092\u4f7f\u3063\u3066\u30a4\u30c6\u30ec\u30fc\u30c8\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>range\u95a2\u6570\u306e\u4f7f\u7528\u4f8b\u3092\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"hljs-comment\"># \u751f\u6210\u4e00\u4e2a\u5305\u542b0\u30011\u30012\u30013\u30014\u7684\u6574\u6570\u5e8f\u5217<\/span>\r\n<span class=\"hljs-built_in\">print<\/span>(<span class=\"hljs-built_in\">list<\/span>(<span class=\"hljs-built_in\">range<\/span>(<span class=\"hljs-number\">5<\/span>)))\r\n<span class=\"hljs-comment\"># \u751f\u6210\u4e00\u4e2a\u5305\u542b2\u30013\u30014\u30015\u30016\u7684\u6574\u6570\u5e8f\u5217<\/span>\r\n<span class=\"hljs-built_in\">print<\/span>(<span class=\"hljs-built_in\">list<\/span>(<span class=\"hljs-built_in\">range<\/span>(<span class=\"hljs-number\">2<\/span>, <span class=\"hljs-number\">7<\/span>)))\r\n<span class=\"hljs-comment\"># \u751f\u6210\u4e00\u4e2a\u5305\u542b1\u30013\u30015\u30017\u30019\u7684\u6574\u6570\u5e8f\u5217<\/span>\r\n<span class=\"hljs-built_in\">print<\/span>(<span class=\"hljs-built_in\">list<\/span>(<span class=\"hljs-built_in\">range<\/span>(<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">10<\/span>, <span class=\"hljs-number\">2<\/span>)))\r\n<span class=\"hljs-comment\"># \u4f7f\u7528\u5faa\u73af\u904d\u5386range\u51fd\u6570\u751f\u6210\u7684\u6574\u6570\u5e8f\u5217<\/span>\r\n<span class=\"hljs-keyword\">for<\/span> i <span class=\"hljs-keyword\">in<\/span> <span class=\"hljs-built_in\">range<\/span>(<span class=\"hljs-number\">5<\/span>):\r\n<span class=\"hljs-built_in\">print<\/span>(i)\r\n<\/code><\/pre>\n<p>\u3053\u306e\u6587\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u30d0\u30fc\u30b8\u30e7\u30f32\u306e\u307f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>[0, 1, 2, 3, 4]\r\n[2, 3, 4, 5, 6]\r\n[1, 3, 5, 7, 9]\r\n1\r\n2\r\n3\r\n4\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Python\u3067\u306frange\u95a2\u6570\u306f\u3001\u6307\u5b9a\u3055\u308c\u305f\u7bc4\u56f2\u306e\u6574\u6570\u306e\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 range\u95a2\u6570\u306e\u3088\u304f\u3042\u308b\u4f7f\u3044\u65b9\u306f3\u3064\u3042\u308a\u307e\u3059\u3002 stop\u307e\u3067\u306e\u7bc4\u56f2 0\u304b\u3089\u59cb\u307e\u308a stop-1\u3067\u7d42\u308f\u308b\u6574\u6570\u5217\u3092\u751f\u6210\u3059\u308b\u3001\u3068 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-118385","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 \u306e range \u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f - 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-\u306e-range-\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python \u306e range \u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f\" \/>\n<meta property=\"og:description\" content=\"Python\u3067\u306frange\u95a2\u6570\u306f\u3001\u6307\u5b9a\u3055\u308c\u305f\u7bc4\u56f2\u306e\u6574\u6570\u306e\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 range\u95a2\u6570\u306e\u3088\u304f\u3042\u308b\u4f7f\u3044\u65b9\u306f3\u3064\u3042\u308a\u307e\u3059\u3002 stop\u307e\u3067\u306e\u7bc4\u56f2 0\u304b\u3089\u59cb\u307e\u308a stop-1\u3067\u7d42\u308f\u308b\u6574\u6570\u5217\u3092\u751f\u6210\u3059\u308b\u3001\u3068 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/python-\u306e-range-\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-23T05:12:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-27T19:17:37+00:00\" \/>\n<meta name=\"author\" content=\"\u685c, \u6625\u6a39\" \/>\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=\"\u685c, \u6625\u6a39\" \/>\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-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/\",\"name\":\"Python \u306e range \u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2024-03-23T05:12:20+00:00\",\"dateModified\":\"2024-03-27T19:17:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/ff22288af1a5455571aff7586b0fb341\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python \u306e range \u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f\"}]},{\"@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\/ff22288af1a5455571aff7586b0fb341\",\"name\":\"\u685c, \u6625\u6a39\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cee48863f3d4fd7fef222498f3e71b82312aee42b7257a2dbde56394ca4e19de?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cee48863f3d4fd7fef222498f3e71b82312aee42b7257a2dbde56394ca4e19de?s=96&d=mm&r=g\",\"caption\":\"\u685c, \u6625\u6a39\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/sakuraharuki\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python \u306e range \u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f - 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-\u306e-range-\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f\/","og_locale":"ja_JP","og_type":"article","og_title":"Python \u306e range \u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f","og_description":"Python\u3067\u306frange\u95a2\u6570\u306f\u3001\u6307\u5b9a\u3055\u308c\u305f\u7bc4\u56f2\u306e\u6574\u6570\u306e\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 range\u95a2\u6570\u306e\u3088\u304f\u3042\u308b\u4f7f\u3044\u65b9\u306f3\u3064\u3042\u308a\u307e\u3059\u3002 stop\u307e\u3067\u306e\u7bc4\u56f2 0\u304b\u3089\u59cb\u307e\u308a stop-1\u3067\u7d42\u308f\u308b\u6574\u6570\u5217\u3092\u751f\u6210\u3059\u308b\u3001\u3068 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/python-\u306e-range-\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-03-23T05:12:20+00:00","article_modified_time":"2024-03-27T19:17:37+00:00","author":"\u685c, \u6625\u6a39","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u685c, \u6625\u6a39"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/","name":"Python \u306e range \u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2024-03-23T05:12:20+00:00","dateModified":"2024-03-27T19:17:37+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/ff22288af1a5455571aff7586b0fb341"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Python \u306e range \u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306f\uff1f"}]},{"@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\/ff22288af1a5455571aff7586b0fb341","name":"\u685c, \u6625\u6a39","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cee48863f3d4fd7fef222498f3e71b82312aee42b7257a2dbde56394ca4e19de?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cee48863f3d4fd7fef222498f3e71b82312aee42b7257a2dbde56394ca4e19de?s=96&d=mm&r=g","caption":"\u685c, \u6625\u6a39"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/sakuraharuki\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python-%e3%81%ae-range-%e9%96%a2%e6%95%b0%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%ef%bc%9f\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/118385","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=118385"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/118385\/revisions"}],"predecessor-version":[{"id":200090,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/118385\/revisions\/200090"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=118385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=118385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=118385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}