I have two lists as below:
x = [1, "A", 2, "B", 3, "C", 4, "D"]
y = [1, "Value1", 1, "Value2", 2, "Value3", 3, "Value4", 3, "Value5", 4, "Value6", 4, "Value7"]
The output I want to create is a list of tuples with two values like below :
xy_merge = [("A", "Value1"), ("A", "Value2"),
("B", "Value3"),
("C", "Value4"), ("C", "Value5"),
("D", "Value6"), ("D", "Value7")]
I tried it with many ways by using simple statements and all but could not get the desired output. Please help in getting this output.