range function

Range Function

The syntax of range() is as follows:

range (start,stop,[step])

Where,

start – refers to the initial value

stop – refers to the final value

step – refers to increment value, this is optional part.

Example : Examples for range()

range (1,30,1) will start the range of values from 1 and end at 29

range (2,30,2) will start the range of values from 2 and end at 28

range (30,3,-3) - will start the range of values from 30 and end at 6

range (20) will consider this value 20 as the end value(or upper limit) and starts the

range count from 0 to 19 (remember always range() will work till stop -1 value only)

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz