Skip to content

Instantly share code, notes, and snippets.

@Peilonrayz
Last active August 28, 2019 13:32
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 Peilonrayz/fd7c43f17754406cb85ff004ff5321c7 to your computer and use it in GitHub Desktop.
Save Peilonrayz/fd7c43f17754406cb85ff004ff5321c7 to your computer and use it in GitHub Desktop.
def main(flavours):
sentinel = object()
flavours = iter(flavours)
flavour = next(flavours, sentinel)
if flavour is sentinel:
return
print(flavour, end='')
for flavour in flavours:
print(', ', end=flavour)
print('.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment