I have a list that contains list of tuples as follows.
mylist = [[\'xxx\', 879], [\'yyy\', 315], [\'xxx\', 879], [\'zzz\', 171], [\'yyy\', 315]]
Another option:
>>> mylist = [['xxx', 879], ['yyy', 315], ['xxx', 879], ['zzz', 171], ['yyy', 315]] >>> y = [] >>> for x in mylist: ... if not x in y: ... y+=[x] ... >>> y [['xxx', 879], ['yyy', 315], ['zzz', 171]]