Skip to content

Instantly share code, notes, and snippets.

@alairock
Last active July 30, 2018 23:08
Show Gist options
  • Save alairock/fdb2a963280acf85f01d3df26b051591 to your computer and use it in GitHub Desktop.
Save alairock/fdb2a963280acf85f01d3df26b051591 to your computer and use it in GitHub Desktop.
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