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 trialtonton lyfe
892 PointsChallenge Task 4 of 4 str.join()
please help
full_name = "M A N"
name_list = full_name.split()
greeting_list = ("Hi, I'm {}".format(full_name)).split()
greeting = " ".join(greeting_list)
2 Answers
Bryan Laraway
13,366 PointsHere, try this:
full_name = "Adam Sandler"
name_list = full_name.split()
greeting_list = "Hi, I'm Treehouse".split()
greeting_list[2] = name_list[0]
greeting = " ".join(greeting_list)
I think the issue is that task 3 asked you to swap 'treehouse' for the first item of the name list, which I did using list indices. Other than that, your code looks fine!
William Laub
7,793 PointsThe challenge asks you to add just the first element of
name_list
to the string that you split into
greeting_list,
and you're presently using your full name. Fix that and it should work.