Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (Retired) Shopping List Lists and Strings

My name_list doesn't match my name how do I fix this? I keep getting the bummer.

This is my second try at this task and I'm still stuck. full_name="terence k" then name_list=["terence k"] and I'm still getting error your name_list doesn't match. need clearer help. thanks

greeting_list.py
full_name = "terence kelley"
name_list = ["terence kelley"]
name_list

2 Answers

The challenge asked not to create your name manually for the name_list

full_name = "Olushi Luqman"
name_list = full_name.split(" ")

Hey Terence!

Luksy is right -- the challenge wants you not to just hardcode the answer in manually -- but that's not the reason why you keep getting the bummer.

Let's take a look at your name_list. You've assigned a list to that variable which has one entry, namely the string "terence kelley". But what the challenge is looking for is a list with an entry for each part of your full name. In this case, that would be a list with two items: "terence" and "kelley".

The challenge is telling you which method it wants you to use: the .split() method. And if you use that method on your full_name variable, and assign that result to the name_list variable, you should pass this task of the challenge, because .split() automatically creates a list and will automatically split on the spaces unless you tell it to do otherwise.

I hope this helps! Please select this as the Best Answer if it was most helpful.

Thanks! and Be Well, Graham