diff --git a/d04.py b/d04.py index 5184ad1..17058fc 100755 --- a/d04.py +++ b/d04.py @@ -2,7 +2,7 @@ from sys import argv -p = [{e.split(":")[0]: e.split(":")[1] for e in l.replace("\n", " ").split()} for l in open(argv[1]).read().split("\n\n")] +p = [dict(e.split(":") for e in l.split()) for l in open(argv[1]).read().split("\n\n")] fi = ["byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"]