def average_word_length(text):
    total_length = sum(len(clean_up(word)) for sentence in text for word in
        sentence.split())
num_words = sum(len(sentence.split()) for sentence in text)
average number of characters per word in a list