init = """3,4,3,1,2"""
fishes = [int(x) for x in init.split(',')]
day = 0

while day < 80:
    addfish = 0
    for i, fish in enumerate(fishes):
        fishes[i] -= 1
        if(fishes[i] == -1):
            fishes[i] = 6
            addfish +=1
    fishes += addfish*[8]
    day+=1
 
print('part 1: day', day, ':', len(fishes))

cal = [0, 0, 0, 0, 0, 0, 0, 0, 0]
fishes = [int(x) for x in init.split(',')]
day = 0

for d in fishes:
    cal[d] += 1

while day < 256:
    zerodays = cal.pop(0)
    cal[6] += zerodays
    cal.append(zerodays)
    day+=1

print('part 2: day', day, ':', sum(cal))

init = """3,4,3,1,2"""
fishes = [int(x) for x in init.split(',')]
day = 0

while day < 80:
    addfish = 0
    for i, fish in enumerate(fishes):
        fishes[i] -= 1
        if(fishes[i] == -1):
            fishes[i] = 6
            addfish +=1
    fishes += addfish*[8]
    day+=1
 
print('part 1: day', day, ':', len(fishes))

cal = [0, 0, 0, 0, 0, 0, 0, 0, 0]
fishes = [int(x) for x in init.split(',')]
day = 0

for d in fishes:
    cal[d] += 1

while day < 256:
    zerodays = cal.pop(0)
    cal[6] += zerodays
    cal.append(zerodays)
    day+=1

print('part 2: day', day, ':', sum(cal))
