def get_useful_words(filename):
    with open(filename, 'r') as file:
        for line in file:
            for word in line.split():
                if len(word) == 10 and word[0].isalpha() and word[-1].isdigit(
                    ):
                    yield word
Python - combine regex patterns