Possible Duplicate:
Python reverse / inverse a mapping
Swap keys for unique values in a dictionary in Python
Hello i want to understand how to reverse and compare dictionary values: for example :
if i have one dictionary with key:value format like this
dicta = [1:2, 9:8, 4:6, 3:2, 0:7, 1:34, 9:90, 1:8, 67:43, 54:23]
How do i reverse it such that values of dicta above become keys and keys become values like this:
dictb = [2:1, 8:9, 6:4, 2:3, 7:0, 34:1, 90:9, 8:1, 43:67, 23:54]
I am using python 2.5 pls help