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

What does it mean by "join the list back into a string"???

I have changed the 'x' to the first item in my name_list but I have no idea what code it is asking me to use for the next step.

greeting_list.py
full_name = "Joel Thompson"
name_list = full_name.split()
greeting_list = "Hi, I'm X".split()
greeting_list[2] = name_list[0]
greeting_list.join() = greeting

1 Answer

Ricky Catron
Ricky Catron
13,023 Points

Your last line is whats throwing you off. Assignment of a new variable is done left to right. Additionally join is used like this.

string_of_list = " ".join(my_list)

So finally that last line should be:

greeting = " ".join(greeting_list)

Goodluck! --Ricky

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

Isn't it supposed to be joined with spaces?

greeting = " ".join(greeting_list)
Ricky Catron
Ricky Catron
13,023 Points

Thank you for correcting that! I have updated my answer accordingly.

--Ricky