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 trialErik Nemcik
1,569 PointsWhat am I missing? :)
Works perfectly in the workspace. I probably misunderstood the exercise. Could you enlighten me?
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = 'Our available flavors are: {}.'
display_menu = ', '.join(sundaes)
menu.format(display_menu)
3 Answers
Steven Parker
231,269 PointsSoooo close!
The challenge said, "Then reassign the menu variable ...". You have everything done, now just put it back into menu.
Mike Wagner
23,559 PointsYou actually have it solved if it weren't for one thing. The Challenge description added this additional requirement
"Then reassign the menu variable to use the existing variable{...}"
so if you just preface your menu.format()
line with a menu =
you'll be good as gold.
Henrik Christensen
Python Web Development Techdegree Student 38,322 PointsI'm not sure what you mean by misunderstanding the exercise if it's working? :-)
Just a quick tip: You can shorten the code like this :-)
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = 'Our available flavors are: {}.'.format(', '.join(sundaes))