Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. dct = {"a": "b", "c":"a"}
  2. dct2 = dct.copy()
  3.  
  4. for key, value in dct2.items():
  5. if value not in dct2:
  6. dct[value] = key
  7.  
  8. dct
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement