Main » 2012 » April » 22 » Python read pairwise from list of single elements
3:14 AM Python read pairwise from list of single elements |
Problem: Read items pairwise from list with single elements (planar_list)
from itertools import izip planar_list = [1, 2, 3, 4] for item1, item2 rom izip(*[iter( planar_list )]*2): print str(item1) + " " + str(item2)See Pairs from single list - http://stackoverflow.com/questions/4628290/pairs-from-single-list for details. |
|
Total comments: 0 | |