Advent of Code 2016 solutions https://adventofcode.com/2016/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

06.py 245B

123456
  1. #!/usr/bin/python3
  2. with open('data/06.txt', 'r') as file:
  3. cols = list(zip(*map(str.strip, file.readlines())))
  4. print(''.join(max(set(col), key=col.count) for col in cols))
  5. print(''.join(min(set(col), key=col.count) for col in cols))