You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
programming-basics-2022/09_python/gen.py

18 lines
309 B

def _range(start, stop):
assert start < stop
def inside_gen():
nonlocal start
while start < stop:
print("Going to return: ", start)
yield start
start += 1
print("here")
return inside_gen()
# for el in _range(0, 10):
# print(el)