Welcome to the Treehouse Community
Looking to learn something new?
David Willson632 Points
for Task 4 of Greeting List my code below is rejected. greeting = greeting_list[0:3] greeting = greeting_list.join()
For Task #4 of Greeting List my additional code below is rejected. can someone please explain why?
greeting = greeting_list[0:3] greeting = greeting_list.join()
[edit formatting --cf]
Chris FreemanTreehouse Moderator 67,989 Points
To join a list of items into a single string using
join(), the format is:
greeting = ' '.join(greeting_list)
join() is a string method that uses the string (a space " " in this case) as a separator between each item in the provide list (the greeting list items).