···1616north_pole_sector_id = None
17171818for line in fileinput.input():
1919- name, sector, checksum = parse_line(line, r'(\S+)-(\d+)\[(\w{5})\]')
1919+ name, sector, checksum = parse_line(r'(\S+)-(\d+)\[(\w{5})\]', line)
2020 sector = int(sector)
21212222 real_name = ''.join(decrypt(c, sector) for c in name)
+1-1
2016/starter.py
···2323 # data = [x for x in line.split(', ')]
2424 # data = [x for x in line]
2525 # data = [int(x) for x in line.split()]
2626- data = parse_line(line, r'')
2626+ data = parse_line(r'', line)
27272828 if i == 0:
2929 print(data)
+1-1
2016/utils.py
···99CONSONANTS = set(x for x in LETTERS if x not in VOWELS)
101011111212-def parse_line(line, regex):
1212+def parse_line(regex, line):
1313 return re.match(regex, line).groups()
14141515