Last active
January 23, 2021 10:04
-
-
Save thorstel/2cfd30169f02c4cca2a56c0cc20e580c to your computer and use it in GitHub Desktop.
Python Advent of Code template for pasting the input directly into source
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TODO URL | |
from collections import * | |
from functools import * | |
import itertools | |
import re | |
import sys | |
def solve(data): | |
for line in data.splitlines(): | |
print(line) | |
######################################################################## | |
# SETUP STUFF # | |
######################################################################## | |
sample_input = r""" | |
""".strip() | |
actual_input = r""" | |
""".strip() | |
if len(sys.argv) > 1: | |
with open(sys.argv[1], 'r') as f: | |
file_input = f.read().strip() | |
solve(file_input) | |
else: | |
print('=== SAMPLE ===') | |
solve(sample_input) | |
print('=== ACTUAL ===') | |
solve(actual_input) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment