How to create a tuple of tuples in python?

python

Solution

Yes:

tuple(zip(A, B))

And this is all. The result will be as follows (both in Python 2.x and 3.x):

>>> tuple(zip(A, B))
((1, 2), (3, 4), (5, 6))

Problem

I want to combine: ``` A = (1,3,5) B = (2,4,6) ``` into: ``` C = ((1,2), (3,4), (5,6)) ``` Is there a function that does this in python?

Original source