15 lines
271 B
Python
15 lines
271 B
Python
# Python!
|
|
import collections
|
|
|
|
with open('06.txt') as file:
|
|
rows = file.read().splitlines()
|
|
|
|
message = ''
|
|
for col in zip(*rows):
|
|
counts = collections.defaultdict(int)
|
|
for char in col:
|
|
counts[char] += 1
|
|
message += min(counts, key=lambda x: counts[x])
|
|
|
|
print(message)
|