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

.join(",")

I've tried several variations including using

menu = "Our available flavors ....".format(",".join(sundaes))

and the code available - I can seem to get it to pass. It continues to ask me if I used .join(",") - which after looking up the uses of join doesn't seem to fit the format.

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

3 Answers

Steven Parker
Steven Parker
231,007 Points

You are very close! You're just missing one character.

If you look closely, you'll see that the challenge asks you to join using: ", " :point_left: a comma and a space.

Bryce Jones
Bryce Jones
200 Points

OMG i was stuck on this for so long till i finally saw that.

OMG! - one feedback I have for treehouse is to provide input output expectations like hackerrank - way too much time spent trying to guess what the hell they want to see - totally messes with the code esteem.