python dic problem

dic_cog_annot[h2[1]]={‘orthologous_group':h[3]} dic_cog_annot[h2[1]][‘protein_annot’]=h[4] 以上是增加个protein_annot键值,

如果是以下,将会被替换,只一个键值!

dic_cog_annot[h2[1]]={‘orthologous_group':h[3]} dic_cog_annot[h2[1]]={‘protein_annot':h[4]}

 

dic[name]=”NA”

dic[name] = {‘nr_annot':”NA”} dic[name][‘go_num’]=”NA” dic[name][‘go_info’] = “NA” dic[name][‘kegg_hit’] = “NA” dic[name][‘kegg_annot’]=”NA” dic[name][‘swiss_annot’]=”NA” dic[name][‘cog_hit’] =”NA” dic[name][‘orthologous_group’]=”NA” dic[name][‘protein_annot’]=”NA”