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

Python Python Basics (2015) Python Data Types Use .split() and .join()

Unable to pass challenge 3 (Python split and join)

Hi there, When submitting the code below I receive status message 'Didn't find right series of sundaes and commas.'

I am not sure what I am doing incorrectly. When I submit in terminal on os x it appears to work. Can you please help?

banana.py
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)

2 Answers

Steven Parker
Steven Parker
231,007 Points

:point_right: You need to assign the final result back to menu.

The instructions aren't completely clear about this, but it is hinted at when they say "let's finish making our menu" and "...all on the same line where menu is currently being set". Also, your final line creates the correct string but it doesn't do anything with it. So it makes sense it should be assigned to something.

If you consider these hints too subtle to be useful (and I might agree), you may want to consider reporting this as a bug on the Support page.

Torsten Lundahl
Torsten Lundahl
2,570 Points

It is the last line that is causing trouble.

Using format on a string won't actually change the string itself, unless it is saved somewhere. What you simply have to do is to put 'menu = ' before menu.format(). That way you are formatting menu, and then saving the result into the variable.