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 trialPamela Zazueta
3,582 PointsKeeps asking me to use 'join.(", ") but I already did
I'm using the 'join.(", ") why is it saying I'm not
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = "Our available flavors are: {}.".format("; ".join(available))
display_menu = ", ".join("sundaes, available")
menu = "Our available flavors are:{}.".format(display_menu)
2 Answers
Umesh Ravji
42,386 PointsHi Pamela, on the 3rd line you are using join("; ")
, which should be a comma, not a semicolon.
In this challenge you have a list of sundaes that you have created using the split
method, named sundaes
. This is the variable that you want to provide to the join
method, not the string available
.
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = "Our available flavors are: {}.".format(", ".join(sundaes))
Pamela Zazueta
3,582 PointsPamela Zazueta
3,582 PointsGot it. For some reason it's still saying "Did you use '.join.(", ")'
Umesh Ravji
42,386 PointsUmesh Ravji
42,386 PointsWhat code are you trying?