python range function syntax code example
Example 1: python range
for i in range(0, 4):
print(i)
>0
>1
>2
>3
for i in range(4):
print(i)
>0
>1
>2
>3
for i in range(0, 4, 2):
print(i)
>0
>2
Example 2: range(n,n) python
# if numbers are same in the range function then,
# the range function outputs empty range
# this is because, there are no integers b/w n and n
for i in range(1,1):
print("runs")
# prints nothing