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

Chancellor Griffin
Chancellor Griffin
2,212 Points

Python quiz won't let me advance because later in the code it's claiming I am breaking task 1?

This claims I am breaking task 1 when I attempt task 3. It's not making any sense and if I delete later lines task one is working just fine... not sure where to go from here

banana.py
available = "banana split;hot fudge;cherry;malted;black and white"
sundaes = available.split(';')
menu = "Our available flavors are: {}."
sundaelist = sundaes.join(", ")
menu = "Out available flacors are: {}.".format(sundaelist)

1 Answer

Daniel Vigil
Daniel Vigil
26,473 Points

You are pretty close with this challenge. I think they may be looking for method chaining. Try this.

available = "banana split;hot fudge;cherry;malted;black and white" sundaes = available.split(';') menu = "Our available flavors are: {}.".format(", ".join(sundaes))

Nicolas Bassano
Nicolas Bassano
2,125 Points

Hey Daniel, I "markdowned" your code so its easier to read. BTW that challenge gave me problems too.

me = "a total newbie" #sorry for this.....>_> 

Anyway, the "markdowned"..................

available = "banana split;hot fudge;cherry;malted;black and white" 
sundaes = available.split(';') 
menu = "Our available flavors are: {}.".format(", ".join(sundaes))
Chancellor Griffin
Chancellor Griffin
2,212 Points

Thank you both Daniel and Nicolas. Anyways yeah I guess the confusing part of the Quiz prompt was that it was asking to make a NEW variable. Which was why I didn't think to go back and just add on to menu.

Thanks again!