Range function

Lesson Progress
0% Complete

Range() is used parameter/argument values for starting and stopping point. Step is used to give increment/decrement to the starting value each time, till it reaches the stopping value.

mysum =0
for i in range (1,5,2)
mysum+=i
  print(mysum)

Output- 4