【python】反转字典键值 前提条件:原字典内值不重复 #dict1 reverse_dict1 = dict([(value,key) for (key,value) in dict1.item()])