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 trialKody Dibble
2,554 PointsPython Challenge 4/4
Not sure how to link the greeting_list back into the greeting variable?
full_name = "Kody Dibble"
name_list = str.split(full_name)
greeting_list = str.split("Hi, I'm Treehouse")
greeting_list[2] = name_list[0]
greeting =
1 Answer
Benjamin Lush
2,707 PointsFrom what I gather you want to see the greeting variable contain the string "Hi, I'm Kody". You can use the string method join() which joins the list elements by the string calling the method. In this case the string with a single space will be calling the join method:
greeting = " ".join(greeting_list)
Does this answer your question?
Michael Pastran
4,727 PointsMichael Pastran
4,727 PointsKody try using the .join() method for strings.