Skip to content

Instantly share code, notes, and snippets.

@kunigami
Last active January 26, 2020 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunigami/ebb1c733dab2eaa5725612f63055344f to your computer and use it in GitHub Desktop.
Save kunigami/ebb1c733dab2eaa5725612f63055344f to your computer and use it in GitHub Desktop.
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