Python – Ranges:

Range a kind of data type in python which is an immutable. Range will be used in for loops for number of iterations. Range is a constructor which takes arguments and those must be integers. Below is the syntax.

Syntax:

stop: the value of stop parameter.

step: the value of step parameter. If the value is omitted, it defaults to 1.

start: the value of start parameter. If the value is omitted, it defaults to zero.

Examples: