I have hundreds of lists such as :
ABCC8 = [\'TRIM29\', \'IGL@\', \'DOCK6\', \'SVEP1\', \'S100A11\', \'EPHA2\', \'KLHL7\', \'ANXA3\', \'NAB1\', \'CELF2\', \'EDNR
list_of_tuples = ([("ABCC8", ABCC8), ("APP", APP), ("BECN1", BECN1), ("ARNTL", ARNTL), ("BMI1", BMI1), ("CASP8", CASP8), ("CASP9", CASP9), ("CLOCK", CLOCK), ("CRAT", CRAT), ("CRY2", CRY2), ("CSF1", CSF1), ("CTCF", CTCF), ("DNMT1", DNMT1), ("EP300", EP300), ("FBXW7", FBXW7), ("FOXA1", FOXA1), ("FOXO1", FOXO1), ("FOXO3", FOXO3), ("GADD", GADD), ("GAT", GAT), ("GCK", GCK), ("GLI1", GLI1), ("GLP1", GLP1), ("GLP1R", GLP1R), ("GLUT1", GLUT1),("GLUT2", GLUT2),("HES1", HES1),("HEY1", HEY1),("HIF1A", HIF1A),("HNF", HNF),("HNF33", HNF33),("ICM33", ICM33),("ID11", ID11),("IDHA11", IDHA11),("IL44", IL44),("IL65", IL56),("LC44", LC44),("LYL2", LYL2),("MFSD", MFSD)])
sort_by_matches(APP, list_of_tuples)