fork download
  1. lst = [1, 3, 4, 7]
  2.  
  3. dic = {"odin": 1, "dva": 2, "tri": 3, "chetire": 4, "pyat": 5}
  4.  
  5. result = [k for k, v in dic.items() if v in lst]
  6. diff = set(lst) - {dic[v] for v in result}
  7. print(diff)
  8.  
Success #stdin #stdout 0.02s 9048KB
stdin
Standard input is empty
stdout
{7}