I have multiple lists of tuples containing two values, such as:
[('0','2'), ('0','2'), ('1','0')]
[('2','2'), ('0','0'), ('0','2')]
[('0','0'), ('2','1'), ('2','1')]
[('0','2'), ('2','0'), ('0','2')]
I want to create a new set of lists that contains tuples in the order that they appear in the list. For instance in the example above, my desired output would be:
[('0','2'), ('2','2'), ('0','0'), ('0','2')]
[('0','2'), ('0','0'), ('2','1'), ('2','0')]
[('1','0'), ('0','2'), ('2','1'), ('0','2')]
I am having trouble thinking about how to even approach this problem because the tuples do not have unique key values, and the actual lists contain around 500 tuples each. The position in the list is the important quality of my new grouping. Each list is on a new row of the file if that helps.
Does anyone have any advice?