I am having problems iterating in python. I have this structure:
a = [('f', 'f'),
('a', 'a'),
('e', 'e'),
('d', 'd'),
('e', 'e'),
('d', 'd'),
('b', 'b'),
('e', 'e'),
('d', 'd'),
('b', 'b'),
('a', 'a'),
('b', 'b'),
('g', 'g'),
('h', 'h'),
('c', 'c'),
('h', 'h'),
('a', 'a'),
('c', 'c'),
('g', 'g'),
('h', 'h'),
('g', 'g'),
('c', 'c'),
('f', 'f')]
And from that I want to get an output that gives me the first value of a parenthesis with the value of the next parenthesis, something like this:
b = [('f','a'), ('a','e'), ('e','d')etc..]
Thank you very much!!