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
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 Staff

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...

Enzie Riddle
Enzie Riddle
Front End Web Development Techdegree Graduate 19,278 Points

Oh I didn’t realize that! When I ran the code through that step in the challenge it didn’t like it when I joined the list