the-honk/python/pythonchallenge.com/10 - Bull.py
2024-10-09 18:02:48 +01:00

15 lines
No EOL
235 B
Python

a = '1'
b = ''
for i in range(0, 30):
j = 0
k = 0
while j < len(a):
while k < len(a) and a[k] == a[j]:
k += 1
b += str(k - j) + a[j]
j = k
print(b)
a = b
b = ''
print(len(a))