
a = 'a3b4c2e10b1'
res = []
tmp = []
for i in a:
    try:
        x = int(i)
        tmp.append(x)
    except ValueError:
        # res.append(str(''.join(tmp)))
        if len(tmp) != 0:
            # for j in tmp:
            #     j = str(j)
            res.append(''.join(map(str, tmp)))
        tmp = []
    # else:

for i in res: print(i, end=' ')

6209b9695562bacb6fc68ad6afd59e6b5b58c3ae
<mask token>

<mask token>
for i in a:
    try:
        x = int(i)
        tmp.append(x)
    except ValueError:
        if len(tmp) != 0:
            res.append(''.join(map(str, tmp)))
        tmp = []
for i in res:
    print(i, end=' ')

a = 'a3b4c2e10b1'
res = []
tmp = []
for i in a:
    try:
        x = int(i)
        tmp.append(x)
    except ValueError:
        if len(tmp) != 0:
            res.append(''.join(map(str, tmp)))
        tmp = []
for i in res:
    print(i, end=' ')


a = 'a3b4c2e10b1'
res = []
tmp = []
for i in a:
    try:
        x = int(i)
        tmp.append(x)
    except ValueError:
        # res.append(str(''.join(tmp)))
        if len(tmp) != 0:
            # for j in tmp:
            #     j = str(j)
            res.append(''.join(map(str, tmp)))
        tmp = []
    # else:

for i in res: print(i, end=' ')
