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
shaunhoyes
17,972 PointsThe instructions say to "Combine the '''sundaes''' list into a new string". What does this actaully mean? Which string?
I am a bit confused on Task 3 of 3
The instructions tell me to βCombine the βββsundaesβββ list into a new stringβ. I am unclear on what this really means.
Then it asks me to βUse that string with a βββ.format()βββ on our existing βββmenuβββ variable and and replace the current value of βββmenuβββ. Does this mean we are supposed to change the βββmenuβββ variable as it is, or start a new line?
I an attempt to get through this problem, I get an error message say that βIt looks like Task 1 is no longer passingβ. The following is my code:
βββ available = "banana split;hot fudge;cherry;malted;black and white" sundaes = available.split(";") menu = "Our available flavors are: {}." new_string = sundaes.join(", ") βββ
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
menu = "Our available flavors are: {}."
new_string = sundaes.join(", ")
2 Answers
Kenneth Love
Treehouse Guest TeacherYour join syntax is backwards. Should be ", ".join(sundaes) because, in Python, you specify the joiner first. That's why task 1 is no longer passing (each previous task is evaluated every time).
For the last step, like the instructions say, you'll be redefining menu and then using .format().
shaunhoyes
17,972 PointsI had to read this a few times, but now I have it. Thanks!