Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x=input()
- X=""
- for char in 'a','b','c':
- curCharCount=1
- while True:
- curPos=x.find(char)
- while x[1+curPos]==char:
- curCharCount+=1
- X=X+char+str(curCharCount)
- x=x[curPos+curCharCount:]
- if x=="":
- break
- print(X)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement