您可以使用一组:
b_set = set(map(tuple,a)) #need to convert the inner lists to tuples so they are hashableb = map(list,b_set) #Now convert tuples back into lists (maybe unnecessary?)
或者,如果您更喜欢列表推导/生成器:
b_set = set(tuple(x) for x in a)b = [ list(x) for x in b_set ]
最后,如果顺序很重要,则可以始终对b进行排序:
b.sort(key = lambda x: a.index(x) )



