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

Can someone please help me with my code?

I'm in the python basics tutorial, and it's about splitting and joining. My code is below:

sundaes = "banana split;hot fudge;cherry;malted;black and white".split(';')

4 Answers

Julian Gutierrez
Julian Gutierrez
19,325 Points

Should look like this.

sundaes = available.split(";")
Julian Gutierrez
Julian Gutierrez
19,325 Points

Use the variable sundaes instead of it's content. In other words there is no need to use the split method on the string when the variable sundaes contains it.

It still won't work.

I tried it again, and here is what I put the second time: available = "banana split;hot fudge;cherry;malted;black and white" sundaes = .split(";")