fork download
  1. alphabets = {'it': {'a', 'b', 'c', 'd', 'e', 'à', 'ì'},
  2. 'en': {'a', 'b', 'c', 'd', 'e'},
  3. 'pl': {'a', 'b', 'c', 'd', 'e', 'ę', 'ś'}}
  4.  
  5. def delta(lang):
  6. d = set(alphabets[lang]) # make a copy
  7. for key, alphabet in alphabets.items():
  8. if key == lang:
  9. continue
  10. d -= alphabet
  11. if not d:
  12. break
  13. return d
  14.  
  15. unique = {lang: delta(lang) for lang in alphabets}
  16.  
  17. print(unique)
Success #stdin #stdout 0.02s 7144KB
stdin
Standard input is empty
stdout
{'en': set([]), 'it': set(['\xc3\xac', '\xc3\xa0']), 'pl': set(['\xc5\x9b', '\xc4\x99'])}