Q. What is the purpose of range() function? Give one example.


Answer :-

It is used to create a list containing a sequence of integers from the given start value up to stop value  (excluding stop value), with a difference of the given step value.

Example :-

for i in range(100) :

It will run from 0 to 99.


Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post