mirror of
https://github.com/jneug/adventofcode.git
synced 2026-04-14 06:43:33 +02:00
removed test input
This commit is contained in:
@@ -1,16 +1,7 @@
|
|||||||
instr = '''
|
|
||||||
A contain 1 C.
|
|
||||||
B contain 1 D.
|
|
||||||
C contain no other bags.
|
|
||||||
D contain 1 E.
|
|
||||||
E contain no other bags.
|
|
||||||
F contain 1 D.
|
|
||||||
'''
|
|
||||||
|
|
||||||
input = dict()
|
input = dict()
|
||||||
with open('day7_input.txt', 'r') as f:
|
with open('day7_input.txt', 'r') as f:
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
if len(line.strip()) > 0:
|
if len(line.strip()) > 0:
|
||||||
btype, content = line.strip()[:-1].split(' contain ')
|
btype, content = line.strip()[:-1].split(' contain ')
|
||||||
btype= btype[:-1]
|
btype= btype[:-1]
|
||||||
input[btype] = content.split(', ')
|
input[btype] = content.split(', ')
|
||||||
|
|||||||
@@ -1,16 +1,7 @@
|
|||||||
instr = '''
|
|
||||||
A contain 1 C.
|
|
||||||
B contain 1 D.
|
|
||||||
C contain no other bags.
|
|
||||||
D contain 1 E.
|
|
||||||
E contain no other bags.
|
|
||||||
F contain 1 D.
|
|
||||||
'''
|
|
||||||
|
|
||||||
input = dict()
|
input = dict()
|
||||||
with open('day7_input.txt', 'r') as f:
|
with open('day7_input.txt', 'r') as f:
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
if len(line.strip()) > 0:
|
if len(line.strip()) > 0:
|
||||||
btype, content = line.strip()[:-1].split(' contain ')
|
btype, content = line.strip()[:-1].split(' contain ')
|
||||||
btype= btype[:-1]
|
btype= btype[:-1]
|
||||||
input[btype] = content.split(', ')
|
input[btype] = content.split(', ')
|
||||||
|
|||||||
Reference in New Issue
Block a user