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 trialEmilio Andere
495 Pointswhy is this split wrong
available = "banana split;hot fudge;cherry;malted;black and white" sundaes = "banana split;hot fudge;cherry;malted;black and white".split(;)
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = "banana split;hot fudge;cherry;malted;black and white".split(;)
6 Answers
Mujibur Rahman
1,658 Pointsavailable = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
The above worked fine for me, just tried it to see if it works.
Mujibur Rahman
1,658 Pointsavailable = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(";")
Emilio Andere
495 Pointshttps://teamtreehouse.com/library/python-basics/python-data-types/use-split-and-join still doesn't let me, It says try again
Mujibur Rahman
1,658 Pointsthe delimiter needs to be in quotes:
available = "banana split;hot fudge;cherry;malted;black and white" sundaes = "banana split;hot fudge;cherry;malted;black and white".split(";")
Emilio Andere
495 Pointsstill does not accept it
Mujibur Rahman
1,658 Pointswhich task is this?
Mad Marcus
Courses Plus Student 87 Pointscreate a new variable named and use the split function
sundaes = available.split(";")
now recheck your work.
Mad Marcus
Courses Plus Student 87 PointsMad Marcus
Courses Plus Student 87 Pointsthe values are already stored in the available variable so no need assign it to sundaes variable
here you can try like:
sundaes = available.split(";")