Created
May 30, 2012 16:04
-
-
Save fforbeck/2837262 to your computer and use it in GitHub Desktop.
pc_03
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import itertools | |
especial_letters = set() | |
in_file = open('pc_03.txt', "rt") | |
while True: | |
line = in_file.readline() | |
if not line: | |
break | |
match = re.search('[A-Z]{3}[a-z]{1}[A-Z]{3}', line) | |
if match is not None: | |
especial_letters.add(match.group()[3]) | |
in_file.close() | |
print(''.join(sorted(especial_letters))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment