I want to create a list (or set) of all unique values appearing in a list of lists in python. I have something like this:
aList=[[\'a\',\'b\'], [\'a\', \'b\'
Try to this.
array = [['a','b'], ['a', 'b','c'], ['a']] res=() for item in array: res = list(set(res) | set(item)) print res
Output:
['a', 'c', 'b']