The Range () function creates a list of variables for you to use, very common when working with \u201cfor\u201d loops.<\/p>\n
There are two ways to create a range:<\/p>\n
In case of ranges, all parameters must be integers, values can be positive or negative and the upper bound in both types is non-inclusive.<\/p>\n
There were two types of ranges in python 2, range and x-range, now in python 3 we only have the range we all know and love.<\/p>\n
It is also possible to create a random rage of numbers using the rand-range function, but since you have to import a module to use it you should just focus your attention in the first two.<\/p>\n
In the python 3 range, ranges have their own data type, and before in python 2, ranges produced lists and x-ranges produced iterators minus a sequence.<\/p>\n
<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":" The Range () function creates a list of variables for you to use, very common when working with “for” loops. There are two ways to create a range: Range (stop): this range starts with zero and ends with the number given as the stop value. Range ([start], stop [step]): you give the function the lower … Continue reading Creation and use of ranges<\/span><\/a><\/p>\n","protected":false},"author":211,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[920,921,39],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/28262"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/users\/211"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=28262"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/28262\/revisions"}],"predecessor-version":[{"id":28265,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/28262\/revisions\/28265"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=28262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=28262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=28262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}