Skip to content

Instantly share code, notes, and snippets.

@feoh
Last active December 31, 2016 03:39
Show Gist options
  • Save feoh/8e3cb84f3f077ecebb958767e7e60013 to your computer and use it in GitHub Desktop.
Save feoh/8e3cb84f3f077ecebb958767e7e60013 to your computer and use it in GitHub Desktop.
# Fluff. This module is fluff. Random crap for testing.
def odd_generator():
"""Generate a series of odd numbers starting with 1."""
num = 1
while True:
num = num + 2
yield num
if __name__ == "__main__":
for odd in odd_generator():
print(odd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment