Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. dict_1 = {1:2, 2:(3,4), 3:5}
  2. dict_2 = {1:3, 2:4, 3:5, 4:2, 5:1}
  3.  
  4. dict_r = {}
  5. for key1, value1 in dict_1.items():
  6. dict_r[dict_2[key1]] = dict_2[value1]
  7. print(dict_r)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement