Advertisement
Andrey_99_cska

5.2 задача (11 номер)

Jan 24th, 2021
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. a={'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}
  2. b={'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}
  3. with open("input.txt", "r") as file:
  4. res=file.read().replace('\n', '').replace('\r', '').replace(' ', '')
  5. x=set(res)
  6. c = a.difference (x)
  7. d = b.difference (x)
  8. e = a.difference (c)
  9. f = b.difference (d)
  10. v=list(f)
  11. w=''.join(v)
  12. y=w.upper()
  13. h=set(y)
  14. g = e.difference (h)
  15. print(g)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement