Python Slices vs Ruby blocks
A couple of my Python colleagues tried to impress me today with Python's named slices feature. The way it works is like that: s = list('helloworld!') => ['h', 'e', 'l', 'l', 'o', 'w', 'o', 'r', 'l', 'd', '!'] WORLD = slice(5, 10) s[WORLD] => ['w'...
Sep 11, 20182 min read18