Beklemishev`s worm

Beklemishev`s worms are similar to the mythological hydra, but instead of regrowing heads, it regrows segments of it's body. Although it might feel like these worms are impossible to kill without doing something else (like how Hercules cauterized their heads). It is in fact possible to kill these worms without doing anything but the rules to slowly kill these worms. How long will it take... the function that describes the amount of steps necessary to kill a one part worm of n number, is as fast growing as ƒε 0 (n). That means that a one part worm of only 3 number, could possibly take longer than Graham`s number of steps to kill.

code for simplified Beklemishev`s worms function (in python)
cl = [int(input('input: '))] def kfinder: RI = 0 cp = len(cl) for i in range(0, len(cl)): cp -= 1 if cl[cp] < cl[-1]: RI = 1 return cp         break if RI == 0: return 'n' def next(m): global cl global g  if cl[-1]: if kfinder == 'n': g = [] b = cl[:(len(cl) - 1)] b.append(cl[-1] - 1) else: g = cl[:(kfinder)] b = cl[(kfinder + 1):(len(cl) - 1)] b.append(cl[-1] - 1) g += b     for i in range(0, m): g += b     cl = g  else: cl.pop s = 1 step = 0 s += 1 while cl: step += 1 next(s) s += 1 print('output is ' + str(step))

code for Beklemishev`s worms (in python)
print('welcome to the beklemishev worm game') cl = [int(input('pick size of worm'))] def clprinter(x): r1 = '' r2 = '' r3 = '' r4 = '' r5 = '' for i in x:       r1 += "              _,.--.  " r2 += "     " + str(i) + "     .'`      -" r3 += ".'.      .'.'`  '``' " r4 += " '.`-...-'.'         " r5 += "  `-...-'            " print(r1) print(r2) print(r3) print(r4) print(r5) def kfinder: RI = 0 cp = len(cl) for i in range(0, len(cl)): cp -= 1 if cl[cp] < cl[-1]: RI = 1 return cp           break if RI == 0: return 'n' def next(m): global cl   global g    if cl[-1]: print('you lowered the worms tail by 1') if kfinder == 'n': g = [] b = cl[:(len(cl) - 1)] b.append(cl[-1] - 1) clprinter(b) print('it regenerated it`s body ' + str(m - 1) + ' times') else: g = cl[:(kfinder)] b = cl[(kfinder + 1):(len(cl) - 1)] b.append(cl[-1] - 1) g += b           clprinter(g) print('it regenerated a piece of it`s body ' + str(m - 1) + ' times') for i in range(0, m): g += b       cl = g    else: cl.pop print('you cut of the worm`s 0 tail') s = 1 step = 0 print('to do an attack on BEKLEMISHEV`S WORM, press enter') clprinter(cl) s += 1 while cl: if input == '': step += 1 next(s) clprinter(cl) s += 1 print('to do next attack, press enter') print(' ') print('it took ' + str(step) + ' steps to kill BEKLEMISHEV`S WORM')