Skip to content

Instantly share code, notes, and snippets.

@codetombomb
Created September 24, 2020 18:30
Show Gist options
  • Save codetombomb/de5dfb7a875836dfa11d024566076f7c to your computer and use it in GitHub Desktop.
Save codetombomb/de5dfb7a875836dfa11d024566076f7c to your computer and use it in GitHub Desktop.
enumerate
def print_days():
days_of_week = ["Mon", "Tues", "Wed", "Thurs", "Fri", "Sat", "Sun"]
for i, d in enumerate(days_of_week):
print(i, d)
if __name__ == "__main__":
print_days()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment