I have a list of lists of tuples like this:
new = [[('name', 'n1')], [('value', 'v1')], [('name', 'n2')], [('value', 'v2')], [('name', 'n3')], [('value', 'v3')]]
I want to map the first 'name' tuple to the first 'value' tuple, second to second, etc. What I have been doing is this:
res = dict(zip(new[0],new[1]))
which gives me {('name', 'n1'):('value', 'v1'), ('name', 'n2'):('value', 'v2'), ('name', 'n3'):('value':'v3')}. This is close, but I really just want this: {'n1':'v1', 'n2':'v2', 'n3':'v3'}.
I just want the second element from the tuple. How can I do this?