-
-
Save Peilonrayz/fd7c43f17754406cb85ff004ff5321c7 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
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