diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2020-12-09 08:14:27 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2020-12-09 08:14:27 +0100 |
| commit | 52ce2afc40e599138d643fe04d42f9c149d91192 (patch) | |
| tree | 769b400c7cdee01f6406de89bee1c41a6ea234ab /20/py/d04.py | |
| parent | f380d54947a4e0d8d3418fb8a52ecbc47aef980c (diff) | |
| download | aoc-52ce2afc40e599138d643fe04d42f9c149d91192.tar.gz | |
common input
Diffstat (limited to '20/py/d04.py')
| -rw-r--r-- | 20/py/d04.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/20/py/d04.py b/20/py/d04.py index d0387f6..8162335 100644 --- a/20/py/d04.py +++ b/20/py/d04.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +import aoc20 import sys @@ -92,9 +93,6 @@ def pt2(_in): if __name__ == "__main__": - if len(sys.argv) > 1: - input = open(sys.argv[1], "r").readlines() - else: - input = open("../input/04", "r").readlines() + input = aoc20.read_input(sys.argv[1:], 4) print(pt1(input)) print(pt2(input)) |
