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

Cant get the menu variable to work

https://teamtreehouse.com/library/python-basics/python-data-types/use-split-and-join

just keep getting stuck on these challenges could do with a hint

any help much appreciated

1 Answer

Hey Josh,

The third step of this challenge is a little confusing when you're trying to understand what everything the video before the challenge goes over.

The video does basically give you the answer, but it is a lot to absorb in one lesson since the syntax is a little unwieldy.

The working code is:

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

sundaes = available.split(';')

menu = "Our available flavors are: {}."

flavors = ", ".join(sundaes)

menu = menu.format((flavors))

Good luck with the course!