31 August 2026
Name Parts
Easy
Strings
Lists
Count the words in each club member name.
You are given a list of club member names. Each name contains one or more words. For each name, count how many words it contains. Return the list of word counts in the same order. Return an empty list when there are no names.
Constraints
names contains at most 50 namesEach name contains lowercase words separated by single spacesEach name has at least one word
Function signature
def name_word_counts(names):