String reorder by integers The aim is to have any strings with integers within to be reorder by these integers.

Let's say you have the following string:

re5 Forty1 cash2 Man3 Booker4


The aim is to have the string order by the integer contained within the string:

Forty1 cash2 Man3 Booker4 re5


I created this function:

def reorder(wordchain):
    from re import findall
    splitchain = wordchain.split()
    entier = findall('\d+',wordchain)
    chaineok = [(a,b) for a,b in zip(entier,splitchain)]
    chaineok.sort(reverse = False)
    chaineok1 = [b[1] for b in chaineok]
    chaineok2 = " ".join(chaineok1)
    return chaineok2    


The function is fine, however, there are a few things I would like to improve:


The number of variable; I would like to have less. What should I do?
The number of lines; I feel there can be fewer lines and definitely fewer operations.
You should use sorted() for sorting and give your function and variables better names.
Something like this:

import re

find_int = re.compile('(\d+)')


def reorder(sentence):
    def num_part(word):
        return int(find_int.search(word).group(0))

    return ' '.join(sorted(sentence.split(), key=num_part))