I need to create a function called compress that compresses a string by replacing any repeated letters with a letter and number. My function should return the shortened vers
from collections import Counter
def string_compression(string):
counter = Counter(string)
result = ''
for k, v in counter.items():
result = result + k + str(v)
print(result)