Hi everyone :)
superlist=[[0,8],[1],[2],[3,6],[4],[5],[6,3,6],[7],[8,0,8],[9]]
I am trying to create a function on a list of lists that will do the following:
1) Deletes a repeat list( i.e. deletes a list that contains a number that has already been used in another list) from left to right so in the superlist it will identify that the first list contains a '0' and an '8' so any further list containing any of those two elements will be deleted. Therefore the penultimate list will be deleted.
So for the example above, if the function were called reduce() then, reduce(superlist) = [[0,8],[1],[2],[3,6],[4],[5],[7],[9]]
Thank you
[Edited mistake thanks to Cart]