Skip to content

Instantly share code, notes, and snippets.

@koi8-r
Created September 22, 2026 16:33
Show Gist options
  • Select an option

  • Save koi8-r/a2ffa01ecffdc3cf5083f79bf9d31337 to your computer and use it in GitHub Desktop.

Select an option

Save koi8-r/a2ffa01ecffdc3cf5083f79bf9d31337 to your computer and use it in GitHub Desktop.
given = "abcdef"
it = iter(given)
res = [(a + b) for a,b in zip(it, it)]
assert ['ab', 'cd', 'ef'] == "".join(res)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment