{"id":857,"date":"2021-07-18T14:01:42","date_gmt":"2021-07-18T14:01:42","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=857"},"modified":"2021-09-09T11:25:52","modified_gmt":"2021-09-09T11:25:52","slug":"what-is-python-range-function","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/","title":{"rendered":"What is Python Range() Function ?"},"content":{"rendered":"<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"range-function\" class=\"color-purple\">Range Function<\/h2>\n<\/div>\n<\/div>\n<p align=\"center\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-medium\" src=\"https:\/\/cdn.wikitechy.com\/interview-questions\/python\/what-is-python-range-function.png\" alt=\"what-is-python-range-function\" width=\"674\" height=\"300\" \/><\/p>\n<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"python-range-function\" class=\"color-purple\">Python Range() Function<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\">\n<div class=\"hddn\">\n<ul>\n<li>The Python range is a built-in function in Python which is very useful to generate sequences of numbers in the form of a list.<\/li>\n<li>The given end point is never part of the generated list.<\/li>\n<li>The range() function has two sets of parameters, as follows:\n<ul>\n<li>All parameters should be integers.<\/li>\n<li>All parameters may be positive or negative<\/li>\n<\/ul>\n<\/li>\n<li>Number of integers is to generate, beginning from zero. eg. range(4) == [0, 1, 2,3].<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"subheading\">\n<h2 id=\"syntax\">Syntax:<\/h2>\n<\/div>\n<div class=\"CodeContent\">\n<div class=\"hddn\">\n<figure class=\"highlight\">\n<pre><code id=\"code1\" class=\"python hljs scss\" data-lang=\"python\"><span class=\"nt\"><span class=\"hljs-function\">range<\/span>(<span class=\"hljs-attr_selector\">[start]<\/span>, stop,<span class=\"hljs-attr_selector\">[step]<\/span>)<\/span><\/code><\/pre>\n<\/figure>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Answer : The Python range is a built-in function in Python which is very useful to generate sequences of numbers in the form of a list.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5608],"tags":[195,491,360,203,199,214,198,209,205,222,484,5724,5729,196,5725,212,213,286,710,207,366,204,217,282,208,5732,5620,5727,5617,5619,5718,5730,5717,5726,5719,5723,5731,5722,5720,5721,5733,5618,483,5728,206,200,197,280,364,5631],"class_list":["post-857","post","type-post","status-publish","format-standard","hentry","category-python","tag-accenture-interview-questions-and-answers","tag-applied-materials-interview-questions-and-answers","tag-atos-interview-questions-and-answers","tag-capgemini-interview-questions-and-answers","tag-casting-networks-india-pvt-limited-interview-questions-and-answers","tag-cgi-group-inc-interview-questions-and-answers","tag-chetu-interview-questions-and-answers","tag-collabera-technologies-interview-questions-and-answers","tag-dell-international-services-india-pvt-ltd-interview-questions-and-answers","tag-flipkart-interview-questions-and-answers","tag-genpact-interview-questions-and-answers","tag-how-to-calculate-inclusive-range","tag-how-to-use-range-in-python","tag-ibm-interview-questions-and-answers","tag-inclusive-range-vs-exclusive-range","tag-indecomm-global-services-interview-questions-and-answers","tag-infosys-technologies-interview-questions-and-answers","tag-lt-infotech-interview-questions-and-answers","tag-mavenir-interview-questions-and-answers","tag-mphasis-interview-questions-and-answers","tag-netapp-interview-questions-and-answers","tag-oracle-corporation-interview-questions-and-answers","tag-peoplestrong-interview-questions-and-answers","tag-persistent-systems-interview-questions-and-answers","tag-prokarma-softech-pvt-ltd-interview-questions-and-answers","tag-python-array-range","tag-python-data-science-interview-questions","tag-python-for-loop-range","tag-python-interview-questions-and-answers-for-testers","tag-python-programming-questions","tag-python-range-float","tag-python-range-for","tag-python-range-for-loop","tag-python-range-function","tag-python-range-inclusive","tag-python-range-inclusive-end","tag-python-range-list","tag-python-range-reverse","tag-python-range-step","tag-python-range-vs-xrange","tag-python-range-with-float","tag-python-telephonic-interview-questions","tag-reliance-industries-ltd-interview-questions-and-answers","tag-reverse-range-python","tag-sap-labs-india-pvt-ltd-interview-questions-and-answers","tag-tech-mahindra-interview-questions-and-answers","tag-unitedhealth-group-interview-questions-and-answers","tag-virtusa-consulting-services-pvt-ltd-interview-questions-and-answers","tag-wells-fargo-interview-questions-and-answers","tag-xoriant-soluti-interview-questions-and-answers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is Python Range() Function ? - Python Interview Questions<\/title>\n<meta name=\"description\" content=\"What is Python Range() Function ? - python programming interview questions and answers ? - The Python range is a built-in function in Python\" \/>\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.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Python Range() Function ? - Python Interview Questions\" \/>\n<meta property=\"og:description\" content=\"What is Python Range() Function ? - python programming interview questions and answers ? - The Python range is a built-in function in Python\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-18T14:01:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-09T11:25:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.wikitechy.com\/interview-questions\/python\/what-is-python-range-function.png\" \/>\n<meta name=\"author\" content=\"Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function\\\/\"},\"author\":{\"name\":\"Editor\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"headline\":\"What is Python Range() Function ?\",\"datePublished\":\"2021-07-18T14:01:42+00:00\",\"dateModified\":\"2021-09-09T11:25:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function\\\/\"},\"wordCount\":79,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function.png\",\"keywords\":[\"Accenture interview questions and answers\",\"Applied Materials interview questions and answers\",\"Atos interview questions and answers\",\"Capgemini interview questions and answers\",\"CASTING NETWORKS INDIA PVT LIMITED interview questions and answers\",\"CGI Group Inc interview questions and answers\",\"Chetu interview questions and answers\",\"Collabera Technologies interview questions and answers\",\"Dell International Services India Pvt Ltd interview questions and answers\",\"Flipkart interview questions and answers\",\"Genpact interview questions and answers\",\"how to calculate inclusive range\",\"how to use range in python\",\"IBM interview questions and answers\",\"inclusive range vs exclusive range\",\"Indecomm Global Services interview questions and answers\",\"Infosys Technologies interview questions and answers\",\"L&amp;T Infotech interview questions and answers\",\"Mavenir interview questions and answers\",\"Mphasis interview questions and answers\",\"NetApp interview questions and answers\",\"Oracle Corporation interview questions and answers\",\"PeopleStrong interview questions and answers\",\"Persistent Systems interview questions and answers\",\"Prokarma Softech Pvt Ltd interview questions and answers\",\"python array range\",\"python data science interview questions\",\"python for loop range\",\"python interview questions and answers for testers\",\"python programming questions\",\"python range float\",\"python range for\",\"python range for loop\",\"python range function\",\"python range inclusive\",\"python range inclusive end\",\"python range list\",\"python range reverse\",\"python range step\",\"python range vs xrange\",\"python range with float\",\"python telephonic interview questions\",\"Reliance Industries Ltd interview questions and answers\",\"reverse range python\",\"SAP Labs India Pvt Ltd interview questions and answers\",\"Tech Mahindra interview questions and answers\",\"UnitedHealth Group interview questions and answers\",\"Virtusa Consulting Services Pvt Ltd interview questions and answers\",\"Wells Fargo interview questions and answers\",\"Xoriant Soluti interview questions and answers\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function\\\/\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function\\\/\",\"name\":\"What is Python Range() Function ? - Python Interview Questions\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function.png\",\"datePublished\":\"2021-07-18T14:01:42+00:00\",\"dateModified\":\"2021-09-09T11:25:52+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"description\":\"What is Python Range() Function ? - python programming interview questions and answers ? - The Python range is a built-in function in Python\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function.png\",\"contentUrl\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-python-range-function.png\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\",\"name\":\"Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"caption\":\"Editor\"},\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/author\\\/editor\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Python Range() Function ? - Python Interview Questions","description":"What is Python Range() Function ? - python programming interview questions and answers ? - The Python range is a built-in function in Python","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.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/","og_locale":"en_US","og_type":"article","og_title":"What is Python Range() Function ? - Python Interview Questions","og_description":"What is Python Range() Function ? - python programming interview questions and answers ? - The Python range is a built-in function in Python","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/","og_site_name":"Wikitechy","article_published_time":"2021-07-18T14:01:42+00:00","article_modified_time":"2021-09-09T11:25:52+00:00","og_image":[{"url":"https:\/\/cdn.wikitechy.com\/interview-questions\/python\/what-is-python-range-function.png","type":"","width":"","height":""}],"author":"Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Editor","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/#article","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/"},"author":{"name":"Editor","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"headline":"What is Python Range() Function ?","datePublished":"2021-07-18T14:01:42+00:00","dateModified":"2021-09-09T11:25:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/"},"wordCount":79,"commentCount":0,"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/python\/what-is-python-range-function.png","keywords":["Accenture interview questions and answers","Applied Materials interview questions and answers","Atos interview questions and answers","Capgemini interview questions and answers","CASTING NETWORKS INDIA PVT LIMITED interview questions and answers","CGI Group Inc interview questions and answers","Chetu interview questions and answers","Collabera Technologies interview questions and answers","Dell International Services India Pvt Ltd interview questions and answers","Flipkart interview questions and answers","Genpact interview questions and answers","how to calculate inclusive range","how to use range in python","IBM interview questions and answers","inclusive range vs exclusive range","Indecomm Global Services interview questions and answers","Infosys Technologies interview questions and answers","L&amp;T Infotech interview questions and answers","Mavenir interview questions and answers","Mphasis interview questions and answers","NetApp interview questions and answers","Oracle Corporation interview questions and answers","PeopleStrong interview questions and answers","Persistent Systems interview questions and answers","Prokarma Softech Pvt Ltd interview questions and answers","python array range","python data science interview questions","python for loop range","python interview questions and answers for testers","python programming questions","python range float","python range for","python range for loop","python range function","python range inclusive","python range inclusive end","python range list","python range reverse","python range step","python range vs xrange","python range with float","python telephonic interview questions","Reliance Industries Ltd interview questions and answers","reverse range python","SAP Labs India Pvt Ltd interview questions and answers","Tech Mahindra interview questions and answers","UnitedHealth Group interview questions and answers","Virtusa Consulting Services Pvt Ltd interview questions and answers","Wells Fargo interview questions and answers","Xoriant Soluti interview questions and answers"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/","name":"What is Python Range() Function ? - Python Interview Questions","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/#primaryimage"},"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/python\/what-is-python-range-function.png","datePublished":"2021-07-18T14:01:42+00:00","dateModified":"2021-09-09T11:25:52+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"description":"What is Python Range() Function ? - python programming interview questions and answers ? - The Python range is a built-in function in Python","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-python-range-function\/#primaryimage","url":"https:\/\/cdn.wikitechy.com\/interview-questions\/python\/what-is-python-range-function.png","contentUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/python\/what-is-python-range-function.png"},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757","name":"Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","caption":"Editor"},"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/857","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=857"}],"version-history":[{"count":3,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/857\/revisions"}],"predecessor-version":[{"id":3243,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/857\/revisions\/3243"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}