I have tuple of lists. The lengths of the lists are same each other. For example:
tol = ([1,2,3], [4,5,6])
I'd like to loop all pair of two lists like:
for v1, v2 in some_operation(tol):
print "(%f, %f)" % (v1, v2)
The above code should print (1,4)\n(2,5)\n(3,6)\n.
One (little dirty) way is use zip
for v1, v2 in zip(tol[0], tol[1]):
print...
Could you show me more simple way?
zipis "dirty", butzip(*tol)looks "cleaner".