summaryrefslogtreecommitdiff
path: root/progs/a924.py
blob: 01596f36f31a00567018731abe67ad3766f028a3 (plain)
1
2
3
4
5
6
def assign_elements(test_list):
  res = dict()
  for key, val in test_list:
    res.setdefault(val, [])
    res.setdefault(key, []).append(val)
  return (res)