Welcome to the Treehouse Community
Looking to learn something new?
I cannot get past the code challenge for 1 of 4 regarding lists. I need help please.
The task is: “Create a variable named full_name that holds your full name. Make another variable named name_list that holds your full name as a list, split on the spaces. Don't create name_list manually!” I wrote:
full_name = "Deborah Anne Winger" name_list =  name_list.append(full_name)
which resulted in:
['Deborah Anne Winger']
I’m being told that my name_list doesn’t match my name. I don’t see how that’s true. What am I missing here? Help.
You're not splitting the name up along the spaces.
The result you're trying to get is this:
['Deborah', 'Anne', 'Winger']
.split() method you can use on
full_name to split it.
Let me know if you need further help.
Sean T. Unwin28,660 Points
You want to use
split() in order to "split on the spaces" as the challenge requests.
name_list = full_name.split(' ')