The following list has some duplicated sublists, with elements in different order:
l1 = [
[\'The\', \'quick\', \'brown\', \'fox\'],
[\'hi\', \'there\'
This one is a little tricky. You want to key a dict off of frozen counters, but counters are not hashable in Python. For a small degradation in the asymptotic complexity, you could use sorted tuples as a substitute for frozen counters:
seen = set()
result = []
for x in l1:
key = tuple(sorted(x))
if key not in seen:
result.append(x)
seen.add(key)
The same idea in a one-liner would look like this:
[*{tuple(sorted(k)): k for k in reversed(l1)}.values()][::-1]