Compress s by replacing every run of the same character with that character followed by the length of the run. A run of length 1 is written as just the character (no 1).
For example "aabcccccaaa" becomes "a2bc5a3".
Example 1
Input:
compress_runs('aabcccccaaa')
Output:
'a2bc5a3'
Example 2
Input:
compress_runs('abc')
Output:
'abc'
0 <= len(s) <= 3 * 10**5s contains lower-case letters.No results yet
Run your code to check it against the examples, or submit to run every test.