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

why is this split() not working?

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

Jason Anders
Jason Anders
Treehouse Moderator 145,863 Points

Hi Omari,

You'll need to provide a link to the challenge in question, or even better, click the "Get Help" button right from the challenge, as this will include the course your are in, the challenge in question, and all the relevant instructions and code needed to best assist you.
Also, if your are just posting code to the Community (and not using the "Get Help" button), please review the Markdown Cheatsheet (link above the Post button) for proper formatting for code snippets. Without it, the code is really very hard to read.

Thank-you and Welcome to the Treehouse Community! :wave: :)

:dizzy:

1 Answer

when using split you have to put it in quotations.

available.split(";")

Moderator edit: Moved reply from comments to Answers, so the answer may be upvoted and/or marked as Best Answer.