2 test cases of string compression

please help me out to find the bug in my code

Plz send your code by saving on ide

Can you send your code.

Your code is counting the total occurance of each individual character in the entire string irrespective of there position.
Example:
Input: aaabbab
Expected output: a3b2a1b1
Program output: a4b4

Hope, this would help.
If you still have doubts, feel free to ask.

thank you for the help. i finally coded.