How to append only the unique item on the list?
===

I am hoping to find way to append only the unique item numlookup and wholetoken.
Is there a good way to do this?    
    numlookup = defaultdict(list) 
    wholetoken = defaultdict(list)
    
    #mydata is file containing mutation description
    mydata = open('/mutation_summary.txt')
    for line in csv.reader(mydata, delimiter='\t'):
        code = re.match('[a-z](\d+)[a-z]', line[-1], re.I)
        if code: 
            numlookup[line[-2]].append(code.group(1))
            wholetoken[line[-2]].append(code.group(0))