Guest User

Untitled

a guest
Oct 15th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import re
  2. import itertools
  3.  
  4. especial_letters = set()
  5.  
  6. in_file = open('pc_03.txt', "rt")
  7. while True:
  8. line = in_file.readline()
  9. if not line:
  10. break
  11.  
  12. match = re.search('[A-Z]{3}[a-z]{1}[A-Z]{3}', line)
  13. if match is not None:
  14. especial_letters.add(match.group()[3])
  15.  
  16. in_file.close()
  17.  
  18. print(''.join(sorted(especial_letters)))
Add Comment
Please, Sign In to add comment