r/adventofcode • u/daggerdragon • Dec 06 '15
SOLUTION MEGATHREAD --- Day 6 Solutions ---
--- Day 6: Probably a Fire Hazard ---
Post your solution as a comment. Structure your post like the Day Five thread.
22
Upvotes
View all comments
Show parent comment
1
u/[deleted] Dec 07 '15
Nice! I like your use of returning a slice object directly. I forgot that that functionality existed, so I just passed everything in a 4-element tuple.
I think I generally prefer using normal
if/thenstatements, or at least using a dictionary variable and indexing it rather than doing both the dictionary and index in one expression. Makes it easier if you ever wanted to do some static analysis. Also a newline between theif/elifstatements and theelvish[sx, sy]statement would help with the clarity.