Advertisement
AnastasiaTukova

Untitled

May 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. message = str(input())
  2. cnt = 1
  3. x = 1
  4. j = message[x:x+1]
  5. for x in message:
  6.     if x in j:
  7.         cnt += 1
  8.     else:
  9.         print(x, end='')
  10.         print(cnt, end='')
  11.         cnt = 1
  12.     x += 1
  13.     j = message[x:x+1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement