Answer:
See Explaination
Step-by-step explanation:
def slice_gen(iterable, start, stop, step):
it = iter(iterable)
if start < 0 or stop < 0 or step <= 0:
raise AssertionError
count = -1
nextI = start
while True:
count += 1
try:
item = next(it)
if count == stop:
break
elif count == nextI:
nextI = nextI + step
yield item
except:
return
for i in slice_gen('abcdefghijk', 3, 7, 1):
print(i, end='')
print("")