Skip to content

Instantly share code, notes, and snippets.

@kunigami

kunigami/generator_1.py

Last active Jan 26, 2020
Embed
What would you like to do?
def range_gen(start, end, step):
i = start
while i < end:
yield i
i += step
for i in range_gen(1, 10, 2):
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.