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()

not proceeding to check work

task one is no longer passing

banana.py
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')

menu = "Our available flavors are: {}".format.join(display_name)
display_menu = " , ".join(sundaes)

2 Answers

Hey Shazlyne! Couple of things, one is that your not using format correctly. A format should look like this:

#Correct code
menu = "Our available flavors are: {}".format(WhatYouWantToFormat)
#Your code
menu = "Our available flavors are: {}".format.join(display_name)

The second things is that your trying to format and join the sundaes, at the same time. This is good but your not using the join method correctly either. It should look like this:

#Correct code:
"WhatYouWantToJoinItWith".join(WhatYourTryingToJoin)
#Your code:
format.join(display_name) #This is invalid because you cant join the variable display_menu with a format

With this in mind your solution should look something like this:

available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
menu = "Our available flavors are: {}.".format(", ".join(sundaes))#Here were formatting, the result we get when we join the sundaes with the ", "
#Also seeing as we have accomplished the task in the menu variable we can leave out the display_menu variable

Hope this helps!

thanks a lot man, figured it out now.