Last active
July 30, 2018 23:08
-
-
Save alairock/fdb2a963280acf85f01d3df26b051591 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def employees(): | |
for y in ['Bob', 'Sally', 'Jake']: | |
yield y | |
def customers(): | |
for ex in ['James', 'Ted', 'Kent']: | |
yield ex | |
def retrieve_all_users(): | |
yield from employees() | |
yield from customers() | |
for user in retrieve_all_users(): | |
print(user) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment