View difference between Paste ID: Kxb9GYnV and DREc4hhm
SHOW: | | - or go back to the newest paste.
1
x = input() 
2
i = 0 
3
cnt = 1  
4-
while (i < len(x)) : 
4+
while (i <= len(x)) : 
5
    if (x[i] == x[i+1]) : 
6
        cnt = cnt + 1 
7
    else:
8
        print(x[i], end='')
9
        print(cnt, end='')
10
		cnt=1