Answers for "create range in python"

11

making your own range function in python

def range_by(starting_number, ending_number):
    #sequence = [starting_number]
    sequence = []
    while starting_number < ending_number:
        sequence.append(starting_number)
        starting_number += 1
        
    return sequence

print(range_by(-3,6))
Posted by: Guest on June-30-2021
3

range py

range(start, stop, step)
 
x = range(0,6)
for n in x:
print(n)
>0
>1
>2
>3
>4
>5
Posted by: Guest on December-04-2020
1

range in python

for i in range (start, step, stop):
  dosomething()
Posted by: Guest on January-11-2021

Python Answers by Framework

Browse Popular Code Answers by Language