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()

It keeps asking for me to break apart "available" using '.split()' but won't let me...

It keeps asking for me to break apart "available" using '.split()' but won't let me... each time I try to add .split(";") to 'available' string, it tells me not to change available. Any advice?

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

1 Answer

available holds the values of the flavors, so you don't have to type them again. you just call split on available.

Thanks James, I had also tried this:

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

Now it's saying "sundaes should be a list What am I missing?