Created
July 6, 2022 16:46
-
-
Save leveled/0d3759eea5f761ee0f4ad4ac306f2542 to your computer and use it in GitHub Desktop.
Iterating through a list 2 characters at a time/extended slicing of lists in python
This file contains hidden or 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
for (op, code) in zip(s[0::2], s[1::2]): | |
print op, code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment