Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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']