I keep getting an error like 'list' object has no attribute 'split'.
And you really don't know why?
Ok, from your other post you know that
words is a list. Fine.
What are you doing here? You want to split a list? Worse than that, you want to do it with
string.
split()!
Here is a receipe how to find the average word-length:
1. Split the string into words (hint: We have that already

)
2. Do something like
total = 0. We need this later
3. Iterate over the words in the list. (hint:
for word in words:)
4. Find the length of the current word (hint: a word is just a
list of characters

)
5. Add this length to total.
6. Ok, after we've done this with every word,
total is the sum of the wordlengths.
7. Divide
total by the number of words.
8. That's it.