Use of Range in Pytho

--Originally published at Ed_Alita

Don’t be scared by the word there are easy as pie

Let’s see that you want to print all number between 1 and 5; therefore you need a range. But let me tall you a little secret in range it only takes until the number you tell it but do not  take the actual number in consideration. Let’s see an example:

range1 In this the 5 willnot be printed.

The actual result of this code is the next one:

range2

Now lets see a more complex range with two variables:

range3

in this case the result will be:

range4

If you want to see more info in the next link:

http://pythoncentral.io/pythons-range-function-explained/