def clean_up(s):
    return s.strip(string.punctuation)

def average_word_length(text):
    total_length = sum(len(clean_up(word)) for sentence in text for word in
        sentence.split())
среднее количество символов в слове в списке