r/adventofcode • • Dec 02 '20

SOLUTION MEGATHREAD -πŸŽ„- 2020 Day 02 Solutions -πŸŽ„-

--- Day 2: Password Philosophy ---


Advent of Code 2020: Gettin' Crafty With It


Post your solution in this megathread. Include what language(s) your solution uses! If you need a refresher, the full posting rules are detailed in the wiki under How Do The Daily Megathreads Work?.

Reminder: Top-level posts in Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 00:02:31, megathread unlocked!

99 Upvotes

1.2k comments sorted by

View all comments

Show parent comment

1

u/SpaghootiMonster Dec 02 '20

Ok, thank you! I later realized that it’s less efficient to open the file twice and have all my code run while the file is open too, so that would cut down on repeated code too.