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 trialMichael Rawlinson
1,507 PointsPython basics task 1 of 4 lists
It gives me an error saying the name_list does not match my name? Question 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!
full_name = "Richard Grinch"
name_list = list(full_name)
Michael Rawlinson
1,507 PointsThank you it works now.
1 Answer
Jeffrey Ruder
6,408 PointsYou need to use the .split method.
name_list = full_name.split()
Christian Kuylen
3,176 PointsChristian Kuylen
3,176 PointsUsing the list command will make a list out of each letter. What you're doing is making a list that looks like: [R, i, c, h...] and so on.
For this task, you need to use the .split() function on your name variable. By default, .split() will create a list out of the string using spaces or tabs as new items in the list.
Hope this helps!