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 trialMathew Yangang
4,433 Points.format()
I am a little bit confused here , i keep having task not passing and syntax errors, not sure what i am doing wrong. Any idea will be helpful
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = "Our available flavors are: {}".format(";".join(sundaes))
display_menu = menu + .format(", ".join(sundaes))
1 Answer
Adam N
70,280 PointsLooks like youre trying to do it with a one liner on line 3. Delete line 4. All that's wrong with line 3 is that youre not joining the list together with the right string.
Your line 3 comes out like this:
Our available flavors are: banana split;hot fudge;cherry;malted;black and white
When it should look like this:
Our available flavors are: banana split, hot fudge, cherry, malted, black and white.
Please mark my response as the 'best answer' if it helps you out!