mirror of
https://github.com/thib8956/advent-of-code.git
synced 2025-08-24 08:21:57 +00:00
accept input file as cmdline argument
This commit is contained in:
@@ -40,5 +40,7 @@ def part2(infile):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
part1("./input.txt")
|
||||
part2("./input.txt")
|
||||
import sys
|
||||
infile = sys.argv[1] if len(sys.argv) > 1 else "example.txt"
|
||||
part1(infile)
|
||||
part2(infile)
|
||||
|
Reference in New Issue
Block a user