我在Python中有一个字典,把人的姓作为键,每个键都有多个链接到它的值。是否有一种方法可以使用for循环在字典中迭代,以搜索特定的值,然后返回链接到的键?print dictKey #dictKey is just whatever the key is that the criteria matched element is linked t
我正在创建一个函数,它将显示querydict的值和键。例如,如果我在GET请求上得到一个QueryDict。.}>def displayQueryDicts(self, request): print x # this willval1, val2, val3, val4, ..., valn
print x .value() # I don't know how to print all the