Resenja

def to_string(d):
    cifre={'0':'nula','1':'jedan','2':'dva','3':'tri','4':'četiri',
           '5':'pet','6':'šest','7':'sedam','8':'osam','9':'devet'}
    s=''
    for c in str(d):
        s += cifre[c]
    return s
print(92,to_string(92))

def to_digits(s):
    cifre=['nula','jedan','dva','tri','cetiri','pet','šest','sedam','osam','devet']
    d=0
    while s != '':
        for i in range(len(cifre)):
            if s.startswith(cifre[i]):
                d = d*10 + i
                s=s[len(cifre[i]):]
                break
    return d           
print('sedampetdvatri',to_digits("sedampetdvatri"))