Solutions to Advent of Code 2017 https://adventofcode.com/2017/
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

12345
  1. with open('data/04.txt', 'r') as file:
  2. phrases = list(map(str.split, file.readlines()))
  3. sorted_phrases = map(lambda p: list(map(sorted, p)), phrases)
  4. print(f'Part one: {sum(1 for p in phrases if not any(p.count(w) > 1 for w in p))}')
  5. print(f'Part two: {sum(1 for p in sorted_phrases if not any(p.count(w) > 1 for w in p))}')