My question is: I have this list:
[['x', '2', 'NOT'], [['sw'], ['y', '1', 'P12'], ['sw']], [['sw'],
['y', '2', 'NOT'], ['sw']], ['x', 'P01'], ['y', 'Xt']]
I'd like to delete the elements duplicate when they appear side by side. Example:['sw']], [['sw']
The end result should be:
[['x', '2', 'NOT'], ['sw'], ['y', '1', 'P12'], ['y', '2', 'NOT'], ['sw'],
['x', 'P01'], ['y', 'Xt']]
I have tried a lot, but I can do that.