advent_of_code/python_tools/aoc_utils.py

12 lines
216 B
Python
Raw Permalink Normal View History

2024-12-01 15:03:28 -05:00
def file2list(filepath):
f = open(filepath, 'r')
return [x.strip() for x in f.readlines()]
2024-12-06 22:55:09 -05:00
def file2listoflists(filepath):
f = open(filepath, 'r')
return [list(x.strip()) for x in f.readlines()]
2024-12-01 15:03:28 -05:00