append list elements to a list of two elements at a time

Use zip:

[list(x) for x in zip(letters[:-1:2], letters[1::2])]

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top