5 ms·
The fact that this idiom is documented in the official Python documentation makes me cringe, knowing that this code is not what I would call explicit. This is
by catwell 13y ago
The fact that this idiom is documented in the official Python documentation makes me cringe, knowing that this code is not what I would call explicit.
This is one of those cases where Ruby does it better (s.each_slice(3).to_a).