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

Sepehr Moghani
Sepehr Moghani
2,286 Points

the menu string incorrect?

I don't know why the menu string is incorrect. It would be a lot easier if you could add an easier way to find out why our answer is wrong.

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

2 Answers

Enzie Riddle
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Enzie Riddle
Front End Web Development Techdegree Graduate 19,278 Points
  1. Check to make sure your menu sentence is correct.
  2. You do not need to join the sundae items.

If you're still stuck, comment back. Happy coding! :)

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! You're doing fine and yes, you do need to join the sundaes menu with a comma and a space just as you're doing. But Enzie Riddle is correct in that your menu string still isn't quite correct.

:bulb: You are using the British spelling of "flavours" instead of the American spelling of "flavors".

Hope this helps! :sparkles:

Sepehr Moghani
Sepehr Moghani
2,286 Points

Because I'm in Australia. Haha. I actually fixed it. I'm learning about true and false now...