Demo the range function : range « Buildin Function « Python






Demo the range function

Demo the range function

print range(5), range(2, 5), range(0, 10, 2)


print range(-5, 5)

print range(5, -5, -1)

           
       








Related examples in the same category

1.Assigning Consecutive ValuesAssigning Consecutive Values
2.Demonstrates the range() functionDemonstrates the range() function
3.range() function with steprange() function with step
4.Demonstrates the range() function with negative step
5.range() Functionrange() Function
6.range function with stepsrange function with steps
7.range with steprange with step