Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while i < j:
- if x[i] == a:
- cnt1 += 1
- i += 1
- else:
- print(cnt1,end='')
- print(a,end='')
- if x[i] == b:
- cnt2 += 1
- i += 1
- else:
- print(cnt2,end='')
- print(b,end='')
- if x[i] == c:
- cnt3 += 1
- i += 1
- else:
- print(cnt3,end='')
- print(c,end='')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement