The trouble I'm having is that these tuples are inside a list of lists of lists as shown below:
giantlist = [[[(0,2), (2,3), (4,5)],[(0,2), (3,4), (6,8)], [(3,4),(0,2)]]]
So, my issue is trying to traverse through each list and find out if they have tuples in common which I then like to print "found common points between list 1 and list 2".
For example: The first list inside the list of lists of lists is
[(0,2),(2,3),(4,5)]
and it has a common tuple with the second list which is the point [(0,2)]
The third list which is shown below also has the common point [(0,2)]
[(3,4),(0,2)]
I would then like to print list1 has a common point with list2 and list3
I've tried a lot of different loops but I'm having trouble comparing the lists because I cant index them properly. I figured that I could find the intersection between these lists and if they had an intersection then I would print.
I also found that maybe I could get the length of each list and then union them and check if the union length is less than the length of the two lists together, that would mean they have a common tuple.