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 trialAdam Gamble
3,300 PointsChallenge task 3 of 3... Not quite getting the .format and .join functions can someone take a look and find the mistake?
available = "banana split;hot fudge;cherry;malted;black and white" sundaes = available.split(";") menu = "Our available flavors are: {}." "Our available flavors are: {}.".format(", ".join(sundaes))
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
menu = "Our available flavors are: {}."
"Our available flavors are: {}.".format(", ".join(sundaes))
1 Answer
Sam Lozier
9,699 Pointssplit is a function of strings not of lists, so when you split available it should look more like:
available = "banana split;hot fudge;cherry;malted;black and white" sundaes = ";".split(available) menu = "Our available flavors are: {}.".format(", ".join(sundaes))
Adam Gamble
3,300 PointsAdam Gamble
3,300 PointsThank you for your help. I did not realize that I was supposed to add that portion to the same line of code. Thanks again for the clarification on the join command!