I am interested in grouping tuples of two elements of a list of tuples that share an element. How could I do this in python?
For example, if I have the list [(1,2),(2,5),(3,4),(4,1),(8,2)] the answer should be [[(1,2),(2,5),(8,2)],[...
asked by
28.11.2018 / 16:26