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!

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

Christopher Borchardt
Christopher Borchardt
2,908 Points

your name_list variable should be a list

I am on the shopping list and when i do name_list = full_name.split I"m getting an error when i check the work, it says 'your name_list variable should be a list' am i doing something wrong? i thought the .split function would take the string of my full name and make a list out of it, splitting at the white space.

full_name = "Christopher Borchardt"
name_list = full_name.split

2 Answers

Larry Tooley
Larry Tooley
23,518 Points

Looks like a simple typo. Try: name_list = full_name.split()

Should yield: ['Christopher', 'Borchardt']