hi everybody , i need to compare two dictionary's key. I have written a script gene_symbol = {} probe_id = {} result = {} def getGene(fname): fh = open(fname , 'r') for line in fh: yield line fh.close() for line in getGene("symbol_hu133"): data1= line.strip().split('#') probe_give = data1[0].strip() gene_give = data1[1].strip() gene_symbol[probe_give] = gene_give #print gene_symbol.keys() for line in getGene("gds1428.csv"): data = line.strip().split(',') probe_get = data[0].strip() probe_id[probe_get] = data if gene_symbol.keys() == probe_id.keys(): print gene_symbol.keys(), probe_id.values()
can anybody show me the error I make here ,while comparing the keys of two dictionaries so that i print the values of the dictionaries whoes Keys are Identical
-- http://mail.python.org/mailman/listinfo/python-list