lesson04

An interesting approach, using sorted, but I see that it's having some trouble with MIN and MAX words.

If you want, try this starter and see if you can make it work for you:

    TOTAL_WORDS = 0
    AVERAGE_WORDS = None
    MAXIMUM_WORDS = 0
    MINIMUM_WORDS = None
    LINES = 0
    for LINE in data.SHAKESPEARE.split('\n'):
        WORDS = LINE.split()
        WORD_CT = len(WORDS)
        LINES += 1
        TOTAL_WORDS += WORD_CT
        if MAXIMUM_WORDS <  WORD_CT:
            MAXIMUM_WORDS = WORD_CT
        # other pieces
        # you can even find crispian inside this loop

Multiple loops are what we'd call computationally expensive, so we avoid them when we can. Sorted, is **very** expensive too. By all means, feel free to continue your approach, but this one is simpler and might prove easier for you.