Advent of Code Solutions Thread: Day Two

Only shitty solutions allowed

38
Jump in the discussion.

No email address required.

why are you all making it so complicated?

with open('day2raw.txt', 'r') as file:
    matches = file.read().strip().replace(' ', '').split('\n')

scores = dict(AX=4, AY=8, AZ=3, BX=1, BY=5, BZ=9, CX=7, CY=2, CZ=6)
print(sum(scores[x] for x in matches))

scores = dict(AX=3, AY=4, AZ=8, BX=1, BY=5, BZ=9, CX=2, CY=6, CZ=7)
print(sum(scores[x] for x in matches))

edit: I did not read the OP :marseyretard2:

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.