0
0
Fork 0

Add day 5

This commit is contained in:
Oliver Akins 2022-12-25 15:55:17 -06:00
parent 45a037d56e
commit 76052fdcb9
No known key found for this signature in database
GPG key ID: 3C2014AF9457AF99

10
day_05/python/part1.py Normal file
View file

@ -0,0 +1,10 @@
stacks = {}
with open("test") as f:
for l in f:
if l == "\n": break
for i in range(len(l)):
if i % 4 == 1 and l[i] != " ":
s = i // 4
if s not in stacks: stacks[s] = []
stacks[s].append(l[i])
print(stacks)