One of the Built-in Functions of Python3 is the range() function. This is a very usefull function that allow us to create in a very easy way lists of numbers. As you may recall we had used it in for loops. There are two ways to use this function:<\/p>\n
0<\/p>\n 1<\/p>\n 2<\/p>\n 3<\/p>\n The list begins at cero and has four elements.<\/p>\n 1<\/p>\n 2<\/p>\n 3<\/p>\n 4<\/p>\n 5<\/p>\n 6<\/p>\n 0<\/p>\n -2<\/p>\n -4<\/p>\n -6<\/p>\n -8<\/p>\n As you can see the second way is very helpfull when we have very specific lists. I found this page<\/a> that explained the range function and I think it’s worth your while. <\/p>\n This is my #Mastery25<\/a> of my #TC1014<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":" One of the Built-in Functions of Python3 is the range() function. This is a very usefull function that allow us to create in a very easy way lists of numbers. As you may recall we had used it in for loops. There are two ways to use this functi… Continue reading >>>for i in range(4):<\/code><\/p>\n
... print(i)<\/code><\/p>\n
\n
>>>for i in range(1,7,1):<\/code><\/p>\n
... print(i)<\/code><\/p>\n
>>> for i in range (0,-10,-2):<\/code><\/p>\n
... print(i)<\/code><\/p>\n