completes day2, starts day3.
This commit is contained in:
15
day3/main.py
Normal file
15
day3/main.py
Normal file
@@ -0,0 +1,15 @@
|
||||
input = open("./test.txt", "r")
|
||||
|
||||
total = 0
|
||||
|
||||
for line in input:
|
||||
total += total
|
||||
lineLength = len(line) - 1
|
||||
lineLength = int(lineLength / 2)
|
||||
print(lineLength)
|
||||
pack1 = line[:lineLength]
|
||||
pack2 = line[lineLength:]
|
||||
print(pack1)
|
||||
print(pack2)
|
||||
|
||||
print(total)
|
||||
6
day3/test.txt
Normal file
6
day3/test.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
vJrwpWtwJgWrhcsFMMfFFhFp
|
||||
jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL
|
||||
PmmdzqPrVvPwwTWBwg
|
||||
wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn
|
||||
ttgJtRGJQctTZtZT
|
||||
CrZsJsPPZsGzwwsLwLmpwMDw
|
||||
Reference in New Issue
Block a user