Here’s a Python snippet of how to subset gene lists. If you have two lists of gene names (NCBI EntrezGene), then you can do an intersection of those genes to use as a selector to find the expression value for the genes in a Pandas DataFrame.
g1 = ['SLC1', 'PSEM','KLK1','IL']
g2 = ['SLC1','KLK3','IL','OR3','TTN']
gr = set(g1).intersection(g2)
expr_vals = { 'SLC1': [0.1,0.2,0.3,0.4], 'PSEM': [0.5,0.6,0.7,0.8], 'KLK3': [0.9, 1.0, 1.1, 1.2], 'IL': [1.3, 1.4, 1.5, 1.6]}
edf = pd.DataFrame(data=expr_vals).transpose()
edf[edf.index.isin(list(gr))]

Now you have a gene list (gr) of the genes of interest and a data frame (edf) of the gene expression data for those genes.