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

Kody Dibble
Kody Dibble
2,554 Points

Python Challenge

I'm not sure what to do for the rest of these steps, not sure what it's asking or the syntax?

full_name = "Kody Dibble":
name_list = (

3 Answers

Devin Bartley
Devin Bartley
2,800 Points

Hi Kody,

Sometimes it takes a bit to really understand what the challenge is looking for.

I would start out by defining your name as a string variable, which you have already done. Please note that in the first line of your code you should delete the colon since it doesn't belong there.

Now you will want name_list to be the full_name variable you already defined but split. Remember the str.split() function will split up a string on the spaces. you will want to put the full_name string inside the function so it knows that it will split that string.

Here is how I got to the challenge to work.Try it out in the workspaces one step at a time and print out the variables to check what it is giving you as output.

full_name = "Devin Bartley"

name_list = str.split(full_name)

Blaise Gratton
Blaise Gratton
30,213 Points

So you have a variable, full_name, which references a string ("Koby Dibble"). You want to store that string split up into a list into the variable name_list. So, name_list would return a list like this:

["Koby", "Dibble"]

See if you can call the right method on full_name to produce a list like this.

Hey Kody Dibble ,

Could you post the important part or entire question for the challenge? This will speed up the process in helping you find an answer.