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 trialTim Ngwena
4,824 PointsWhy is the following wrong in this ecercise, it works in console and is it not what the question is asking?
The question fails as you can see in this screenshot: http://imgur.com/a/YVqBH however run the same thing in console and it works and i think this is what the question is asking. >> http://imgur.com/a/gS1Zg
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
menu = "Our available flavors are: {}."
display_menu = menu.format(", ".join(sundaes))
2 Answers
james south
Front End Web Development Techdegree Graduate 33,271 Pointsyou are not doing exactly what the challenge is asking for. the final answer should be assigned to menu, not display_menu. display_menu is an intermediate step.
Tim Ngwena
4,824 PointsOkay maybe just my misinterpartion of it as the ask for the "brave" solution doesn't come across as a requirement. Thanks for your help.
Jake Salo
13,175 PointsYeah, try formatting the string using the same variable, like this:
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = ("Our available flavors are: {}." ).format(", ".join(sundaes))
Tim Ngwena
4,824 PointsThis is what I did to move on. :)
Matt Juergens
16,295 PointsMatt Juergens
16,295 PointsRead the directions carefully... 1."Combine the sundaes list into a new variable named display_menu, where each item in the list is rejoined together by a comma and a space (", ")" 2."Then reassign the menu variable to use the existing variable and .format()" You're on the right track, and yes your code will output the correct string, but you're not exactly doing what he asks.
Great job though, I hope I helped without giving you the answer