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 Python Basics (2015) Python Data Types Use .split() and .join()

Shoot! I don't remember what to do.

I haven't been able to spend consistent time working on my courses. I know I would get this down if I had more consistent time on this, but I'm just getting so confused about it and I'm honestly not sure what I'm supposed to be doing.

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

2 Answers

Brett McGregor
Brett McGregor
Courses Plus Student 1,903 Points

Hi Sean,

Check your syntax carefully. There are two syntax errors in your line of code.

Take a look at the Teacher Notes under the relevant video. That should help!


You are really close! First of all, when you declare a variable, you do not want the single-quotes ('). Second, you have the right idea with


Your syntax error is on your ";" (semi-colon)... All you need to do is put your semi-colon between " (double-quotes)

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

Do you see the subtle difference? But great job, you had on the right process! Keep it up!