Nov-06-2021, 08:17 PM
I have this randomly generated list in python:
l = [[2,3,4,5],[2,3],[7,8],[2],[4,5,6]]
and i want to remove the items [2,3] and [2] because they are completely contained in the first item [2,3,4,5].
newl = [[2,3,4,5],[7,8],[4,5,6]]
How do I do that?
l = [[2,3,4,5],[2,3],[7,8],[2],[4,5,6]]
and i want to remove the items [2,3] and [2] because they are completely contained in the first item [2,3,4,5].
newl = [[2,3,4,5],[7,8],[4,5,6]]
How do I do that?