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 trialLoh Pin Hua
3,160 Pointsproblem
I'm stuck. can you help me? this is my code:
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = "Our available flavors are: {}."
sundaes.join(['banana split', 'hot fudge', 'cherry', 'malted', 'black and white'])
1 Answer
Andreas cormack
Python Web Development Techdegree Graduate 33,011 PointsHi Loh
The challenge asks you to split a string down based on a delimiter. You can call the split function on any string, the split function takes an argument which is the delimiter to split on which in this case will be the ';'. For example your name like so Loh;Pin;Hua would not make sence, so to split it i would call "Loh;Pin;Hua".split(";") which would return a list like [ Loh Pin Hua]. You can then use the join function to create a new string " ".join([ Loh Pin Hua]).
Hope this helps.
Sergey Podgornyy
20,660 PointsSergey Podgornyy
20,660 PointsProvide your code please