题解 | #记录喜好的字典#
记录喜好的字典
https://www.nowcoder.com/practice/b48ac65b70534898a2900dfad254d8d9
dict_lang={ 'NiuNiu':'Java', 'NiuMei':'Python', 'Niukele':'CPP', 'NiuNeng':'Python', 'Tony':'Java', 'Anna':'CPP', 'Allen':'CPP', } input_lang=input() list_result=[] for i in dict_lang.keys(): if input_lang not in dict_lang.values(): print('Nobody') break elif dict_lang[i]==input_lang: list_result.append(i) if len(list_result)>0: print(list_result)