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

Richmond Baker
Richmond Baker
620 Points

I can't seem to get Task 2 of 4 correct. What have I missed? I don't think I understand the question completely.

Since I am a newbie at this. I sometimes don't grasp exactly what you are looking for in these questions. This one has taken me over an hour. Sad I know but hints would be nice, or links to examples, or a direct link to the video and time in the video in which you explain what we are being asked. Any of those would be nice. Also I lose my place every time I go back to look at the video. It would be nice to be able to keep my work or give me the availability to have the video pop up.

full_name = "Rich Baker"
name_list = full_name.split()
string = "Hi, I'm Treehouse"
greeting_list = [string.split(' ')]

3 Answers

Hi Rich,

You are on the right track, but you are adding an unnecessary step. You can add .split() to the end of a string to split it.

your 3rd line would work as

greeting_list = "Hi, I'm Treehouse".split()

as to the video issue, I usually just open the video from the step before in another window so that I can look at it really quick without losing my place!

Hopefully this helps!

greeting_list = "Hi, I'm Treehouse".split()

Richmond Baker
Richmond Baker
620 Points

Thank you both. I am glad you are out there helping.