advent-of-code/_templates/riddle/new/python.ejs.t

40 lines
531 B
Perl
Raw Normal View History

2021-12-01 13:46:12 +00:00
---
2023-11-18 16:06:39 +00:00
to: <%= dir %>/python/main.py
2023-11-01 23:23:17 +00:00
unless_exists: true
2021-12-01 13:46:12 +00:00
---
#!/usr/bin/env python
from os.path import join, dirname
2023-11-29 14:57:17 +00:00
# Setup
2021-12-01 13:46:12 +00:00
def read_input(filename):
data = join(dirname(__file__), '..', filename)
with open(data) as f:
2021-12-03 07:58:27 +00:00
return f.read().strip()
2021-12-01 13:46:12 +00:00
2021-12-07 11:13:33 +00:00
2023-11-29 14:57:17 +00:00
TEST = read_input('test.txt')
INPUT = read_input('input.txt')
# Task
def part_a(raw: str):
pass
def part_b(raw: str):
pass
2021-12-07 11:13:33 +00:00
2022-12-08 14:12:15 +00:00
# Running
2023-11-29 14:57:17 +00:00
print('1.')
print(part_a(TEST))
print(part_a(INPUT))
print('\n2.')
print('1.')
print(part_b(TEST))
print(part_b(INPUT))