Compress string by counting consecutive chars. Example: "aaabbc" => "a3b2c1"
Implement this function:
def string_compression(s: str) -> str:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: s.
Input
'aaabbc'
Output
'a3b2c1'