I have a trouble counting words in a list.
My_list = ["white is a colour", "orange is a fruit", "blue is a mood", "I like candy"]
What I need the script to output is the number of words in the list (15 in this case).
len(My_list)
will return "4" (the number of items).
for item in My_list:
print len(item.split())
will give me length of each item.
Is there a way to get the word count from a list? Ideally, I would also like to append each word into a new list (each word is an item).