Losing Metaphors: Zip and Paste : vimarsana.com

Losing Metaphors: Zip and Paste

In python (and several other languages) if I have two lists and want to process corresponding elements together I can use zip: >>> for number, letter in zip( ... [1,2,3,4], ["a", "b", "c", "d"]): ... print(number, letter) ... 1 a 2 b 3 c 4 d The metaphor is a zipper, taking the two sides and merging them together. It's not perfect, since a zipper interleaves instead of matching pair

Related Keywords

, Bell Labs Center , Functional Programming , Shell , Tech ,

© 2025 Vimarsana