Return an output string that translates an input string `s`/`$s` by replacing each character in `s`/`$s` with a number representing the number of times that character occurs in `s`/`$s` and separating each number with the character(s) `sep`/`$sep`.
from collections import Counter 

def freq_seq(s, sep):
    dic = Counter(s) 
    result = ''
      
    for char in s:
        for key, value in list(dic.items()):
            if char == key:
                result  += str(value)+sep
    
    
    return result[:-1]

from collections import Counter 

def freq_seq(s, sep):
    dic = Counter(s) 
    result = ''
      
    for char in s:
        for key, value in list(dic.items()):
            if char == key:
                result  += str(value)+sep
    
    
    return result[:-1]
