Skip to content

Instantly share code, notes, and snippets.

@ahmedbesbes
Last active July 9, 2023 09:20
Show Gist options
  • Save ahmedbesbes/20ee2573ba7982a3c8b3030e25dc28b2 to your computer and use it in GitHub Desktop.
Save ahmedbesbes/20ee2573ba7982a3c8b3030e25dc28b2 to your computer and use it in GitHub Desktop.
from typing import Sequence
def print_sequence_elements(sequence: Sequence[str]):
for i, s in enumerate(sequence):
print(f"item {i}: {s}")
@alexandrmalinovsky
Copy link

Shouldn't the variable in the enumeration be called 'sequence'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment