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
Steven Bell
660 PointsWhat am I doing wrong?
Instructions are to combine sundaes list into a new lists separating it (', '), use the .format() to join and give a new value to menu. What am I doing wrong.
1 Answer
Chris Freeman
Treehouse Moderator 68,468 PointsThe phasing can be confusing since you don't use "format to join". Let's look at each part.
combine sundaes list into a new lists separating it (', ')
Combine sundaes list using the string .join() method
sundae_list = ", ".join(sundaes)
use the .format() to ... give a new value to menu
Since menu is a string it has the .format() method which can be used to fill in the field {}.
menu = "Our available flavors are: {}.".format(sundae_list)
The challenge wants these two lines combined:
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
menu = "Our available flavors are: {}.".format(", ".join(sundaes))
Steven Bell
660 PointsSteven Bell
660 PointsThanks Chris! I couldn't figure out what I was doing wrong. Thanks for breaking it down for me!