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

Jeremy Graslie
Jeremy Graslie
2,037 Points

Lists and Strings: Challege Task 4

After reaching the Challenge at the end of Lists and Strings, it is asking me to manipulate the strings for a greeting Once I get to step 4, however, if I enter what I think is correct it refers me back to Step 1

The code I want to enter is: greeting = greeting_list.join(" ")

after entering this, it tells me that Step 1 no longer works. When I remove it, and go back to step one, and don't change any other code, it works.

Can anyone tell me what code it's looking for?

Thanks,

Jeremy

greeting_list.py
full_name = "Jeremy James Graslie"
name_list = full_name.split(" ")
greeting_list = "Hi, I'm Treehouse".split(" ")
greeting_list[2] = name_list[0]

1 Answer

rydavim
rydavim
18,814 Points

You've got the right idea, Python just uses a different syntax for join.

greeting = " ".join(greeting_list) # It's 'backwards' from what you're intuitively trying.