This is list of tile placements. Each integer stands for an id of a tile. Each time an integer is added to a new list it means that a new tile is placed. When a tile is removed, the last integer is removed from a new list. I want that every time a tile is placed the list to be unique. A list dont have to be unique, when a tile is removed. The code is placing these tiles in a for loop. So for this example, the last list of the lists is wrong, because it wasn't unique when a tile was placed. Is there a way to exclude numbers which will make the new list not unique. So for this example is there a way to exclude the id 18, before it adds to the list.
I know this is a very vague question, but I am new to python and can't make the code of this assignment easier. I hope someone could help me with this vague question
[[1, 2, 3, 13, 4, 5, 6, 7, 17],
[1, 2, 3, 13, 4, 5, 6, 7, 17, 8],
[1, 2, 3, 13, 4, 5, 6, 7, 17, 8, 15],
[1, 2, 3, 13, 4, 5, 6, 7, 17, 8, 15, 9],
[1, 2, 3, 13, 4, 5, 6, 7, 17, 8, 15, 9, 10],
[1, 2, 3, 13, 4, 5, 6, 7, 17, 8, 15, 9, 10, 18],
[1, 2, 3, 13, 4, 5, 6, 7, 17, 8, 15, 9, 11],
[1, 2, 3, 13, 4, 5, 6, 7, 17, 8, 15, 9, 11, 18],
[1, 2, 3, 13, 4, 5, 6, 7, 17, 8, 15, 9, 10],
[1, 2, 3, 13, 4, 5, 6, 7, 17, 8, 15, 9, 10, 18]]
The lists must be in this order. So for example i have had these lists:
[[1, 2, 3, 13, 4, 5, 6, 7, 17],
[1, 2, 3, 13, 4, 5, 6, 7],
[1, 2, 3, 13, 4, 5, 6, 7, 8],
[1, 2, 3, 13, 4, 5, 6, 7],
[1, 2, 3, 13, 4, 5, 6, 7, 19],
[1, 2, 3, 13, 4, 5, 6, 7]]
I want to exlude the ids 17,8,19
So for [1, 2, 3, 13, 4, 5, 6, 7] the output must look like this ( id ont care if the output is a list or integers)
[17,8,19]
But when i have this list [1, 2, 3, 13, 4, 5, 6] in lists
[[1, 2, 3, 13, 4, 5, 6, 7, 17],
[1, 2, 3, 13, 4, 5, 6],
[1, 2, 3, 13, 4, 5, 6, 7, 8],
[1, 2, 3, 13, 4, 5, 6, 7],
[1, 2, 3, 13, 4, 5, 6, 7, 19],
[1, 2, 3, 13, 4, 5, 6, 7]]
The output is this:
[7]
I hope this will make it more clear.