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 trialLarry Tooley
23,518 PointsNeed help understanding the question.
I just do not understand what the question is looking for.
I split available.
I created menu by using string formatting and the sundaes list.
I can create the display_menu variable by rejoining sundaes with commas.
I tried reassigning the variable menu on a seperate line and inline. Still not passing.
What part of this questions am I not understanding?
Thanks
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = 'Our available flavors are: {}'.format(sundaes.join(', '))
display_menu = sundaes.join(', ')
Tri Pham
18,671 PointsI'd suggest you use an online ide like this so you'll clearly see error messages and can easily print() things.
Anani Assoutovi
Courses Plus Student 1,048 Pointsavailable = "banana split;hot fudge;cherry;malted;black and white" sundaes = available.split(";") menu = "Our available flavors are: {}.".format(', '.join(sundaes)) display_menu = menu
1 Answer
james south
Front End Web Development Techdegree Graduate 33,271 Pointsthe join method is called on the delimiter string, with the collection as argument, so you have it backwards there.
(', ').join(sundaes)
is how you use it. you only need to use join once, to create a string of flavors, then that string becomes the argument for the format method called to form the menu string.
Larry Tooley
23,518 PointsThanks, James! I got Javascript Array.join() confused with Python join().
Larry Tooley
23,518 PointsLarry Tooley
23,518 PointsFigured it out. I was using join wrong. I wish the challenges would respond with proper Python error messages. It would make tracking this stuff down much easier.