for i in file_list:
    k = i.split('.')[-2]
if k in drug_list:
    if k in dictonary:
        dictonary[k].append(i)
else:
    dictonary[k] = [i]
combine two lists into a dictionary if a pattern matches