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

Great! Finally, make a variable named greeting where you join greeting_list back into a string, separated by spaces. You

What else should i do to make this code correct

greeting_list.py
full_name = "simbarashe chibgwe"
name_list = full_name.split(" ")
greeting_list = "Hi, I'm Treehouse".split(" ")
greeting_list[2] = name_list[0]
greeting = "Hie, I'm "  join.greeting_list[2]

1 Answer

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

Yeah, you should make sure of the join method from String class.

greeting = " ".join(greeting_list)

This will join the list item back to a String separated by space.

Thanks William, I have tried it but i realized that i was always forgetting the dot before Join.