Combining every pair of list items and creating a new list.

aaron.m.weisberg at gmail.com aaron.m.weisberg at gmail.com
Mon Jul 17 16:10:19 EDT 2017


Hi, 

I'm having difficulty thinking about how to do this as a Python beginner.

But I have a list that is represented as:

[1,2,3,4,5,6,7,8]

and I would like the following results:

[1,2] [3,4] [5,6] [7,8]

Any ideas?

Thanks



More information about the Python-list mailing list