Question: Q2 A tuple is sequence of comma separated values inside parenthesis. For instance (2,3) is a two-tuple. Write a function called unzip that takes in

Q2 A tuple is sequence of comma separated values inside parenthesis. For instance (2,3) is a two-tuple. Write a function called unzip that takes in a list of two-tuples in its parameters and returns a tuple of two lists. call to unzip([(1,4), (2,5),(3,6)]) would return ([1,2,3],[4,5,6]) a call to unzip([(1,2)1) would return ([1],[2]) a call to unzip([('A','B'), ('X','Y)]) would return (['A','X'],[B',Y']) a call to unzip(I) would return (D.0) Test your function by calling the function from inside the main function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
