0
Can any one tell me how i make a own range function in define?
I am Aakash and I am too confused how make own range function in Python can anyone tell me how i can make it
3 Respuestas
+ 9
# I'd go like this:
def xrange(start, stop, step=1):
i = start
while i < stop:
yield i
i += step
print(list(xrange(0, 30, 4)))
+ 7
There, I made it into a [PythonEdu] code. Check out the comments inside:
https://code.sololearn.com/co4tk353axjg/?ref=app
0
okay but i did it. can you explain the everything in English.