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

Python

I can not get passed the third objective in the exercise concerning .split() and .join().

I am having trouble getting past the third objective in the exercise. I can get through the first two, but once I try to get through the third, it says that the first objective is no longer valid. Here is my code: please help!! available = "banana split;hot fudge;cherry;malted;black and white" sundaes = available.split(";") menu = "Our available flavors are: {}." flavors = sundaes.join(", ") menu.format(flavors)

1 Answer

Try this instead:

available = "banana split;hot fudge;cherry;malted;black and white"

sundaes = available.split(";")
menu = "Our available flavors are: {}.".format(sundaes.join(', '))

Hope it helps! ~Alex

Alexander, thank you for your help! Unfortunatley I am getting the same error, that the first objective is no longer valid. The first objective is to split the available by ; and name that variable sundaes. The code we wrote to do this was sundaes = available.split(";") This is the same problem that I was having. Once i get past the second objective, it says the first objective no longer is valid. PLEASE HELP!!

Oh :( I'm sorry to hear that but this code works just fine for me.