Last active
December 31, 2016 03:39
-
-
Save feoh/8e3cb84f3f077ecebb958767e7e60013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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