Is any elegant way to make a list contains some integers to become a list contains some tuples?

python

Solution

pairs = zip(*[iter(a)]*2)

is a common idiom

Problem

I have a list ``` a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ``` Is any elegant way to make them work in pair? My expected out is ``` [(1, 2), (3, 4), (5, 6), (7, 8), (9, 10)] ```

Original source

Related problems