I have a list that contains list of tuples as follows.
mylist = [[\'xxx\', 879], [\'yyy\', 315], [\'xxx\', 879], [\'zzz\', 171], [\'yyy\', 315]]
The reason that you're not able to do this is because you have a list of lists and not a list of tuples.
What you could do is:
mytuplelist = [tuple(item) for item in mylist] mylist = list(set(mytuplelist))
or
mylist = list(set(map(tuple, mylist)))