Solución
solution.tsTypeScript
def my_range(start: int, stop: int, step: int = 1):
# Genera valores desde start hasta stop (excluido) de step en step
current = start
while current < stop:
# Emite el valor actual y avanza
yield current
current += step
def collect_range(start: int, stop: int, step: int = 1) -> list:
return list(my_range(start, stop, step))0respuestas