My Advent of Code solutions in Python. kevinyap.ca/2019/12/going-fast-in-advent-of-code/
advent-of-code python
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update 2017/day21.py

Strip newline from puzzle input for correctness.

+1 -1
+1 -1
2017/day21.py
··· 15 15 RULES = {} 16 16 17 17 for line in fileinput.input(): 18 - rule_in, rule_out = line.split(' => ') 18 + rule_in, rule_out = line.strip().split(' => ') 19 19 20 20 # Build all rule rotations and reflections 21 21 grid = [list(x) for x in rule_in.split('/')]