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 trialHouse Trigo
36,620 PointsSplitting and Joining (3 of 3)
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = "Our available flavors are: {}".format(", ".join(sundaes))
Bummer! Didn't find the right series of sundaes and commas in menu
.
2 Answers
Ferdinand Pretorius
18,705 PointsHi House,
The code you have is correct, from what I can tell anyway, I think it's just the specific challenge and how the test was written. I've done my challenge as follow:
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
menu = "Our available flavors are: {}."
menu = menu.format(", ".join(sundaes))
Hope this helps!
Lance Gilbert
686 PointsI just ran into this "issue" -- how the challenge/test is setup. I had the code syntax correct for part 3, added to end of menu variable ... but the test is structured to modify menu with a new line of code ... frustrating to say the least, burned some time on that one!
Ferdinand Pretorius
18,705 PointsI know, it is rather frustrating at times, but I can understand that writing some of these tests can be quite hard. It is especially true when testing .format on strings.
House Trigo
36,620 PointsHouse Trigo
36,620 PointsHey Ferdinand,
I compared our solutions and it turns out that I forgot the period "." at the end of my menu string in task 2.
menu = "Our available flavors are: {}."
It's weird how this error allowed me to pass task 2 in the first place. Probably a bug in the challenge; hope it gets fixed soon.
Thanks for your help!
Ferdinand Pretorius
18,705 PointsFerdinand Pretorius
18,705 PointsI agree that is strange, I've made that mistake countless times, probably why I didn't pick up on it :p .
Either ways, I guess the bigger picture is that Treehouse does not only teach coding, but proper use of punctuation as well ( even if it is in a string :) )
Take care!