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 trialAndrew Duley
6,033 PointsConfused about Challenge Task 3 of 3
I am sorry but I can't figure out the 3rd task of the Python Basics questions. It says to set the menu variable to the currently existing variable and I'm just not sure what that is. I've tried many different answers and it typically tells me that "It looks like step won't won't pass" or something to that effect.
Thanks in advance
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
display_menu = sundaes.join(", ")
menu = "Our available flavors are: {}.".format(display_menu)
2 Answers
Jason Anders
Treehouse Moderator 145,860 PointsHey Andrew,
You are definitely on the right track ! Good job so far.
Everything is correct except for the line where you are joining
the list. You have all the elements there, it's just a bit mixed up. You actually have to attach the join()
method to the "how" not the other way around. So, that line should look like this:
display_menu = ", ".join(sundaes)
Notice that you have the ", " first and then the method, with the list being passed in.
Keep Coding! :)
Thomas Shriver
1,684 PointsI was doing the exact same with join. Thanks for question and answer.
Andrew Duley
6,033 PointsAndrew Duley
6,033 PointsThank you for the reply! I did some research around the web and figured out that's exactly what I was doing wrong. Now that see what it should look like, I immediately recall seeing that in one of the lessons. Funny how quickly the brain can forget things.