Browse Source

Golf day 4 parser a little

master
mid-kid 4 years ago
parent
commit
a5e3f33b16
  1. 2
      d04.py

2
d04.py

@ -2,7 +2,7 @@
from sys import argv 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"] fi = ["byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"]

Loading…
Cancel
Save