Finding average word length in a given year
totword and totLen are not so good names.
And in any case PEP8 suggests to use snake_case for both variable and function names. So I recommend the following renames:


total_word_length instead of totLen
word_count instead of totword
average_word_length instead of avgWordLen


When you iterate over keys in a dictionary and then lookup the values in every iteration step,
then it's better to iterate over the dictionary items.
That is, instead of:


    for word in words:
        for nary in words[word]:



Do like this:

    for word, nary_list in words.items():
        for nary in nary_list:


This way you avoid unnecessary dictionary lookups.

At the end of the method, the else is unnecessary,
because the if part always returns.
It's slightly simpler this way:

    if word_count != 0:
        return total_word_length / word_count
    return 0